Computer Science, asked by gamingofficial12020, 5 months ago

A computerized ticket counter of an underground metro rail station changes for
each ride at the following rates:
Age(in years)
AMOUNT/HEAD
18 or above
Rs.50
5 or above but below 18
Rs.20
Accompanying kids below 5
NIL
Write a program which takes the number of people of various age-groups as input and
prints a ticket. At the end of the journey, the program states the number of passengers
of different age groups who travelled and the total amount received as collection of
fares
please anyone tell me the python code for the above​

Answers

Answered by puneetdevman
1

Answer:

NIL means 0, code here

Explanation:

input (age)

if(age>=18)

print 50

elseif(age>=5)

print 20

else

print 0

Answered by bindushree716
3

Answer:

ANSWER IS

Explanation:

adult=int(input("enter the no.of people age in age group of 18 or above"))

middle=int(input("enter the no. of people age in age group of 18 or above"))

child=int(input("enter the no. people of age in age group of below 5"))  

print("18 or above is", adult)

print("5-18 years", middle)

print("5 below", child)

#to check the total amount of fares collected at the end of the journey

print("the amount of fare collected by railway:")

print("total fare: rs.",(adult*50)+(middle*20)+(child*0))

HOPE IT IS HELPFUL!!!

Similar questions