For Apple store services and apps(like games, videos, etc ): you can gain access if you
are15years old or less and your parent has an Apple ID. If you are 16 years old or more
you need to have your own Apple ID.
Write a program that uses short circuit logic to tell someone if they are legal to gain
access to Apple store services. First ask them how old they are, whether they have an
Apple ID or not, and whether their parent has an Apple ID or not.
age=int(input("Enter your age: "))
if (age<=15):
  hasID=input("Do you have your parents Apple ID? ")
  if hasID=='yes':
    parent_id=int(input("Enter your parents Apple ID: "))
    print("you are allowed to access Apple store services using id ",parent_id)
  elif hasID=='no':
    print("You cannot access Apple store")
  else:
    print("Please type yes or no")
else:
  your_id=int(input("Enter your id:"))
  print("you are allowed to access Apple store services using id ",your_id)
Comments
Leave a comment