Following are the python program to calculate discount by input age value:
Program Explanation:
Program:
passengerName=input("Enter passenger's name: ")#Defining a variable passengerAge that inputs sting value
ageString=input("Enter passenger's age: ")#Defining a variable ageString that inputs string value
passengerAge=int(ageString)#defining a variable passengerAge that converts string into integer value
if passengerAge<=6 or passengerAge >=65:#use if that checks passenger age in between 6 to 65
print("passenger is eligible for a discount of 25%")#print message
else:#else block
print("passenger is not eligible for a discount of 25%")#print message
Output:
Please find the attached file.
Learn more:
brainly.com/question/6503092