So I am using modular arithmetic to work out what day it will be in "x" amount of days. I have tried to use the break command to end the while loop but when I do it prints what the answer will be for all of the loops. This is my code for one of the loops
while (x) == ('Monday') or ('monday'):
if round_4 == ".1":
print ("It will be Tuesday")
elif round_4 == ".2":
print ("It will be Wednesday")
elif round_4 == ".3":
print ("It will be Thursday")
elif round_4 == ".4":
print ("It will be Friday")
elif round_4 == ".5":
print ("It will be Saturday")
elif round_4 == ".6":
print ("It will be Sunday")
elif round_4 == ".7":
print ("It will be Monday")
elif round_4 == ".8":
print ("It will be Tuesday")
elif round_4 == ".9":
print ("It will be Wednesday")
elif round_4 == ".0":
print ("It will be Monday AGAIN")
else:
print ("Sorry, there has been a tecnical difficulty! Please try again!")
If round_4 was say ".2" it would print the ".2" elif for all the while loops.
Sorry, I'm a bit of a n00b to python!
whileloop is here?whileloop asxis not changing within it.