lundi 4 novembre 2019

How can I show after user's enter their ages if they are the youngest or oldest person so far without using a list?

Please ignore the fee and count variables. I think I can only use the if and elif statement.

   if choice == 1:
      memid = int(input("Member ID: "))
      age = int(input("Age: "))


      if age <= 25:
        count += 1
        fee += 30
      elif age > 25 and age < 55:
        count += 1
        fee += 50
      elif age >= 55:
        count += 1
        fee += 15

Aucun commentaire:

Enregistrer un commentaire