Alright so here is my code, I get the result I want but I keep getting the "None" value under it. How do I eliminate the "None" value?
n = input("What day of the week are you leaving?")
r = input("How many days will you be resting?")
def days(n):
if n == 0:
print "Sunday"
elif n == 1:
print "Monday"
elif n == 2:
print "Tuesday"
elif n == 3:
print "Wednesday"
elif n == 4:
print "Thrusday"
elif n == 5:
print "Friday"
elif n == 6:
print "Saturday"
elif n >= 7:
print days(n%7)
print days(n+r)
You print in function days and print result from function days. Because of function days returns nothing it prints None.
This should do the trick:
Change all the
print
statements in yourdays(n)
function toreturn
instead.days
never returns anything, so it implicitly returnsNone
. Change all of theprint
statements indays
toreturn
statements: