Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Python Program 1 - game.py (10 points) Write a python program for determining the ticket price for watching a game. The user will be asked

Python image text in transcribed
image text in transcribed
Program 1 - game.py (10 points) Write a python program for determining the ticket price for watching a game. The user will be asked to enter his age and if the age of a person is less than 10 years then he is not eligible to buy a ticket, but if his age is greater than 50 or less than 20 then the ticket price is $12, otherwise the ticket price will be $20. The program should work with these expected outputs: Sample run with age 38: Enter you age: 38 Ticket price is $20 Sample run with age 55: Enter you age: 55 Ticket price is $12 Sample run with age 8: Enter you age: 8 You're not eligible to buy a ticket. Program 2 - weights.py (10 points) write a complete program that asks the user for a number of ounces. The program reports the number of pounds that is equivalent to and the number of ounces left over. There are 16 ounces in a pound. If the number of ounces is less than or equal to 16, the program just reports the number of ounces. If the entered number of ounces is less than 0 then print a msg saying the number cannot be negative. The user input will be integer data type. Below are the outputs expected. Sample run with user input 43: How many ounces? 43 There are 2 pounds and 11 ounces left over. Sample run with user input 12: How many ounces? 12 There are 12 ounces. Sample run with user input 0: How many ounces? 0 There are 0 ounces. Sample run with user input-5: How many ounces? -5 The number of ounces cannot be negative

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Information Modeling And Relational Databases

Authors: Terry Halpin, Tony Morgan

2nd Edition

0123735688, 978-0123735683

More Books

Students also viewed these Databases questions

Question

. b) c) a, b, c 1 1 2 2-13 0 17 1 2 2 3 4 5 L

Answered: 1 week ago

Question

What are Measures in OLAP Cubes?

Answered: 1 week ago

Question

How do OLAP Databases provide for Drilling Down into data?

Answered: 1 week ago

Question

How are OLAP Cubes different from Production Relational Databases?

Answered: 1 week ago