WorksheetsPython 3
Total questions: 17
Worksheet time: 9mins
What will be the output of the following code?
🌍🌎
🌍
🌍🌏
No output
What will be the printed output?
No output
🔔
🔔🛎
🛎
What will be the result of the following code?
🚀🚀🚀🚀
✈️✈️🚀🚀
✈️✈️✈️✈️
✈️✈️🚀✈️
Which of the following lines of code would make the statement “Hello World” repeat 10 times?
print('Hello World' x 10)
print('Hello World' * 10)
print('Hello World' + 10)
Which of the following lines of code would output the statement "Python programming is easy!"?
print("Python is easy!")
print("Programming in Python is easy!")
print("Python programming is easy!")
Which of the following code snippets correctly stores the phrase "Hello World" in a variable called a and then prints it?
Which of the following code snippets correctly stores the integer 256 in a variable called points and then prints it?
To print "Hello Rob-bot, you are 10 years old" using variables, which is right?
name = "Rob-bot"; age = "10"
name = Rob-bot; age = 10
name = "Rob-bot"; age = 10
Which code snippet correctly asks for the user's name details and prints the message?
Uses input thrice and prints "Hello" with first and last.
Uses firstName and lastName without spaces in the print.
Prints "Hello" with first, and, and last.
Prints using name + last.
What will the output of the following code be?
print(3 + 5)
8
35
3 + 5
Error
How do you create a single-line comment in Python?
/* This is a comment */
-- This is a comment
# This is a comment
Which of the following is the correct way to define a string variable in Python?
x = string('Hello')
x = Hello
x = 'Hello'
What does the following code output?
Hello, Alice!
Hello, name!
Hello, "Alice"!
Error
Which is NOT a valid data type in Python?
str
int
float
num
What will be the output of the following code?
print("🍕" * 2 + "🍔")
🍔🍔🍕
🍕🍕🍔
🍕🍔🍔
Given the variable count = 3, how can you print "I have 3 🍎."?
print("I have " + count + " 🍎.")
print(f"I have {count} 🍎.")
print("I have ", count, " 🍎.")
How are you feeling today?
I'm feeling great 😃
I'm good 🙂
I'm doing fine but could be better 😕
I'm struggling 😔
I don't know 😐
