조건문

旅人·2023년 5월 30일
0

Code 1

age = int(input('Enter you age : '))

if age < 10 :
 print('age < 10')
elif age < 40 :
 print('10 <= age < 40')
else :
 print('40 <= age')

Code 2

meaty = input('Do you eat meat ? (y/n) : ')

if meaty == 'y' :
  print('here is the meaty menu...')
else :
  print('here is the veggie menu...')

참고 : https://www.youtube.com/watch?v=t3c41sKJS20&list=PL4cUxeGkcC9idu6GZ8EU_5B6WpKTdYZbK&index=8

profile
一期一会

0개의 댓글