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

Programming Questions

Quiz
•
Education
•
8th Grade
•
Medium

D Sweeney
Used 3+ times
FREE Resource
11 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
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
Similar Resources on Quizizz
11 questions
Begrüßungen (German)

Quiz
•
8th Grade - University
15 questions
Classroom language

Quiz
•
8th Grade
10 questions
Lesson 33 - Collection module

Quiz
•
5th - 8th Grade
15 questions
Lesson 15 - Test 2

Quiz
•
5th - 8th Grade
10 questions
Lesson 11 - Iterative statements

Quiz
•
5th - 8th Grade
11 questions
At the bank

Quiz
•
6th - 8th Grade
10 questions
GREETINGS AND FAREWELLS

Quiz
•
1st - 8th Grade
10 questions
Lesson 27 – Concept of arguments

Quiz
•
5th - 8th Grade
Popular Resources on Quizizz
15 questions
Multiplication Facts

Quiz
•
4th Grade
25 questions
SS Combined Advisory Quiz

Quiz
•
6th - 8th Grade
40 questions
Week 4 Student In Class Practice Set

Quiz
•
9th - 12th Grade
40 questions
SOL: ILE DNA Tech, Gen, Evol 2025

Quiz
•
9th - 12th Grade
20 questions
NC Universities (R2H)

Quiz
•
9th - 12th Grade
15 questions
June Review Quiz

Quiz
•
Professional Development
20 questions
Congruent and Similar Triangles

Quiz
•
8th Grade
25 questions
Triangle Inequalities

Quiz
•
10th - 12th Grade
Discover more resources for Education
25 questions
SS Combined Advisory Quiz

Quiz
•
6th - 8th Grade
20 questions
Congruent and Similar Triangles

Quiz
•
8th Grade
14 questions
Exterior and Interior angles of Polygons

Quiz
•
8th Grade
6 questions
Earth's energy budget and the greenhouse effect

Lesson
•
6th - 8th Grade
15 questions
SMART Goals

Quiz
•
8th - 12th Grade
20 questions
Lesson: Slope and Y-intercept from a graph

Quiz
•
8th Grade