03-Use of Modulo Operator %.py

Sign up Free. Don't forget to check out our challenges, lessons, solve and learn series and more ...

Code Snippet

#Use of Modulo Arithmetic

print("Here's a little modulo magic for ya...")
dayofweek=input("Enter day of week (e.g. Monday, Tuesday, Wednesday, etc:")
numberofdays=input("Enter number of days from that day of the week you would like to calculate:")
print(numberofdays,"from -",dayofweek,"-will be-",answer)


Try it yourself