samedi 15 février 2020

why cant I get this if statement to show?

so I need to make sure the information I am inputting shows if its less than, greater than, or equal too. not sure if the variable is messed up or not. here is the code:

#the main function
def main():
    print   #prints a blank line
    age = getAge ()
    weight = getWeight()
    birthMonth = getMonth()
    print
    correctAnswers(age, weight, birthMonth)

#this function will input the age
def getAge():
    age = input('Enter your guess for age: ')
    return age

#thisfunction will input the weight
def getWeight():
    weight = input('Enter your guess for weight: ')
    return weight

#thisfunction will input the age
def getMonth():
    birthMonth = raw_input('Enter your guess for birth month: ')
    return birthMonth

#this function will determine if the values entered are correct
def correctAnswers(age, weight, birthMonth):
    if age <= 25:
        print 'Congratulations, the age is 25 or less.'

    if weight >= 128:
        print 'Congatulations, the weight is 128 or more.'

    if birthMonth == 'April':
        print 'Congratulations, the birth month is April.'

#calls main
main()

Aucun commentaire:

Enregistrer un commentaire