Hello everyone this is my first post and I just started my Python class. I am stuck on an assignment...pl ease help
I have to redo the below program (from a prior assignment) to include 2 functions in addition to main program. The first function should ask for the hours and return them to the main program. The second function should receive the hours from the main program, calculate the minutes and display them
original program code referring to question above
def main():
main()
what I have so far
def intromsg():
def main():
Its probably something so simple. I think I am incorrectly getting the hours from the user to be multiplied by 60 to show minutes. Please Help
I have to redo the below program (from a prior assignment) to include 2 functions in addition to main program. The first function should ask for the hours and return them to the main program. The second function should receive the hours from the main program, calculate the minutes and display them
original program code referring to question above
def main():
print"This program converts hours to minutes"
hours = input ("Please enter the number of hours to be converted: ")minutes = hours * 60
print "The number of minutes is:", minutesmain()
what I have so far
def intromsg():
print "This program converts hours to minutes"
def gethours():hour = input ("Enter the number of hours: ")
return score
def minutes():total = gethours() * 60
def main():
intromsg()
gethours()
minutes()
Its probably something so simple. I think I am incorrectly getting the hours from the user to be multiplied by 60 to show minutes. Please Help
Comment