Answer to Question #273008 in Python for Karabo

Question #273008

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.



1
Expert's answer
2021-11-29T06:52:14-0500
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)

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS