Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Python please and thank you. When I put in the value for 65 it is returned as 10 even though it should be 8. Below
Python please and thank you. When I put in the value for 65 it is returned as 10 even though it should be 8. Below are two pictures the prompt and my code. I just need help fixing my code so it displays correctly.
Prompt the user for their name, get and store the user input. Prompt the user for their age, get and store the user input. We will assume that the user will enter a positive integer and will do no error checking for valid input. Determine and store a movie ticket price based on the user's age. If their age is 12 or under, the ticket price is $5. If their age is between 13 and 64, inclusive, the ticket price is $10. If their age is 65 or greater, the ticket price is $8. When all the user input has been gathered, print out a meaningful label such as 'Name: 'followed by the entire user name on one line. On the next line, print out a meaningful label such as 'Age:'followed by the user's age. On the next line, print out a meaningful label such as 'Ticket Price: ' followed by the ticket price your program calculated. Your output should look something like this: Name: Mickey M Mouse Age: 19 Ticket Price: $10 main.py Untitled2.py Untitled3.py + 1 2. first_name = input("Enter your first name:") middle_name = input("Enter your middle initial:") last_name = input("Enter your last name:") age = int(input("Enter your age:")) 3 4 5 6 - if age =13 or age =65: 11 price = 8 12 13 14 15 print("Name:", first_name, middle_name, last_name) print("Age:", age) print("Ticket Price : ", price) 16Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started