0
0
Pythonprogramming~20 mins

First Python Program (Hello World) - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Hello World Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
Predict Output
intermediate
1:00remaining
What is the output of this Python code?
Look at this simple program. What will it print when run?
Python
print('Hello World!')
AHello World!
Bhello world!
CHelloWorld!
DSyntaxError
Attempts:
2 left
💡 Hint
Remember, print shows exactly what is inside the quotes.
Predict Output
intermediate
1:00remaining
What will this code print?
This program prints two lines. What is the output?
Python
print('Hello')
print('World!')
AHelloWorld!
BHello\nWorld!
C
Hello
World!
DHello World!
Attempts:
2 left
💡 Hint
Each print prints on a new line.
Predict Output
advanced
1:30remaining
What error does this code raise?
Look at this code. What error will it cause when run?
Python
print('Hello World!') print('Again')
AIndentationError
BSyntaxError
CNameError
DNo error, prints both lines
Attempts:
2 left
💡 Hint
Two statements must be on separate lines or separated by a semicolon.
Predict Output
advanced
1:00remaining
What is the output of this code?
What will this program print?
Python
message = 'Hello World!'
print(message)
AHello World!
B'Hello World!'
Cmessage
DNameError
Attempts:
2 left
💡 Hint
Variables hold values that print without quotes.
🧠 Conceptual
expert
1:30remaining
Which option will cause an error when running this code?
Consider these four print statements. Which one will cause an error?
Aprint('Hello' + ' ' + 'World!')
Bprint('Hello World!')
Cprint("Hello World!")
Dprint(Hello World!)
Attempts:
2 left
💡 Hint
Strings must be inside quotes to print correctly.