Jun-20-2019, 08:47 PM
Hello all
New to python any help much appreciated. When I run the code below if I enter No on the first attempt python prints "PLEASE CAN I HAVE ANOTHER ONE" AS EXPECTED. If I then enter yes on the next cycle it does not print thanks mum it keeps looping back to "Please can I have another one". Can some one help.
New to python any help much appreciated. When I run the code below if I enter No on the first attempt python prints "PLEASE CAN I HAVE ANOTHER ONE" AS EXPECTED. If I then enter yes on the next cycle it does not print thanks mum it keeps looping back to "Please can I have another one". Can some one help.
print("Mum can I have an ice cream?") answer= input() while answer == "No": print("Please can I have one") anwser = input() print("Thanks mum")