Viva Learning
A Microsoft Viva module that provides employees with formal and informal learning.
104 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
new_planet = ''
planets = []
while new_planet.lower() != 'done':
if new_planet : # Checks if the user has entered a value
planets.append(new_planet) # Add a value to the planets list
new_planet = input('Enter a new planet or done if done') # We ask the user to enter a value
```print ('List of planets entered')
for planet in planets:
print(new_planet)
Please Note
run on Juypter Notebook
nothing happen
please assist. Thank you.
#
This question is related to the following [Learning Module](https://learn.microsoft.com/en-us/training/modules/python-loops/5-exercise-for-loops)
if new_planet:
and
new_planet = input('Enter a new planet (lower case) or done if done\n')
on same identation
its able to print "Hello"
however, nothing happen. Please assist. Thank you.