zyulfi

Adulthood

May 14th, 2025 (edited)
734
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.46 KB | Source Code | 0 0
  1. # 2. Пълнолетие
  2. # Напишете програма, която приема възраст и отпечатва:
  3. #   "Пълнолетен", ако е 18 или повече
  4. #   "Непълнолетен", ако е под 18
  5.  
  6. age = int(input("Please enter the person's age: "))
  7.  
  8. if age <= 0:
  9.     print("Age cannot be less than or equal to 0.")
  10. elif age < 18:
  11.     print("The person is a minor.")
  12. else:
  13.     print("The person is of legal age.")
  14.  
Tags: Adulthood
Advertisement
Add Comment
Please, Sign In to add comment