Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to print the word Hello.
Python
print([1])
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Forgetting the quotes around the text.
Trying to print a variable that is not defined.
✗ Incorrect
The print() function needs a string inside quotes to print text. So "Hello" is correct.
2fill in blank
mediumComplete the code to print the number 5.
Python
print([1])
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Putting quotes around numbers when not needed.
Using words instead of numbers.
✗ Incorrect
To print a number, just write the number without quotes inside print().
3fill in blank
hardFix the error in the code to print the word Python.
Python
print([1])
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Leaving out quotes around text.
Using incomplete quotes like a single quote without closing.
✗ Incorrect
Text must be inside matching quotes. "Python" is correct.
4fill in blank
hardFill both blanks to print the sum of 2 and 3.
Python
print([1] [2] [3])
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using minus - instead of plus +.
Putting numbers inside quotes which prints text, not sum.
✗ Incorrect
To print the sum, use 2 + 3 inside print().
5fill in blank
hardFill all three blanks to print the message: Hello 5 times.
Python
for i in range([1]): print([2] * [3])
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using wrong range number.
Not putting Hello inside quotes.
Using variable i instead of number for multiplication.
✗ Incorrect
range(5) repeats 5 times, printing "Hello" * 5 prints Hello 5 times in one line.