Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

if-elif-else statements python

age = 20

if age < 4: ticket_price = 0
elif age < 18: ticket_price = 10
else: ticket_price = 15

print(ticket_price)
Source by nostarch.com #
 
PREVIOUS NEXT
Tagged: #statements #python
ADD COMMENT
Topic
Name
5+3 =