Exercise: if statement - add missing condition
In the code below, the
if
-statement assigns a new value to the variable text, but only if its condition is met. Currently, the condition is missing. Add any condition that will make the print()
function log Hello World
.text = 'Hello'
# add condition here...
if
text = text + ' World'
print(text)
# expected output: Hello World
Python
Setting up Python environment...
Output