Programming Questions

Programming Questions

8th Grade

11 Qs

quiz-placeholder

Similar activities

Culture Covers Values: Europe Day

Culture Covers Values: Europe Day

5th - 12th Grade

10 Qs

Naruto Knowledge  (Shippuden)  Part 1

Naruto Knowledge (Shippuden) Part 1

3rd Grade - University

10 Qs

Taking initiative

Taking initiative

6th - 8th Grade

11 Qs

And Then There Were None Chapters 1-4 Vocabulary

And Then There Were None Chapters 1-4 Vocabulary

7th - 10th Grade

10 Qs

Republic Day Quiz

Republic Day Quiz

KG - 12th Grade

10 Qs

Passive

Passive

8th - 12th Grade

10 Qs

PAST PAST PAST !

PAST PAST PAST !

7th - 8th Grade

12 Qs

GAMIFICATION (Day 2)

GAMIFICATION (Day 2)

7th - 10th Grade

15 Qs

Programming Questions

Programming Questions

Assessment

Quiz

Education

8th Grade

Practice Problem

Medium

Created by

D Sweeney

Used 3+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

11 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the following code do? print("Hello World")

Prints 'Hello World' to the console

Saves 'Hello World' to a file

Sends 'Hello World' over the network

Deletes 'Hello World' from the database

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the following code do? name = input("What is your name")

It assigns a default name to the variable 'name'.

It prompts the user to enter their name and assigns it to the variable 'name'.

It prints the user's name to the console.

It checks if the variable 'name' is empty.

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the following code do? age = int(input("What is your age"))

It asks the user for their age and stores it as a string.

It asks the user for their age and stores it as an integer.

It calculates the user's age based on the current year.

It prints the user's age to the console.

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How many times is "Hi" printed? Animal = "Cat" if animal == "Cat": print("Hi") elif animal == "Cat": print("Hi") elif animal == "Mouse": print("Hi") else: print("Hi")

0 times

1 time

2 times

3 times

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How many times is "Hi" printed? Animal = "Cat" if animal == "Cat": print("Hi") if animal == "Cat": print("Hi") if animal == "Mouse": print("Hi") else: print("Hi")

0

1

2

3

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the following code do? for i in range(3): print("Hello")

Prints 'Hello' three times to the console

Prints 'Hello' once to the console

Prints 'Hello' indefinitely

Does not print anything

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of the following code? number = 5 if number > 3: print("Greater") else: print("Smaller")

Greater

Smaller

Error

No output

Create a free account and access millions of resources

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?