Question: USING PYTHON: Write a program to calculate tuition for students of a community college. In-state students pay $60 per credit hour, and will pay for

USING PYTHON:

Write a program to calculate tuition for students of a community college. In-state students pay $60 per credit hour, and will pay for only 12 credit hours even if they register for more hours. Out-of-state students pay $200 per credit hour, and will pay for 15 credit hours as the maximum. In the main function, ask the user whether he is in-state or out-of-state. Then ask the user how many credit hours he is taking. Pass number of credit hours to the following two functions:

tuition_instate: Calculate and display tuition for in-state students.

tuition_outstate: Calculate and display tuition for out-of-state students.

Call one of these two functions to calculate tuition, depending on user input.

The following are two examples

Are you in-state students? [y/n] y

How many credit hours are you taking? 14

You are paying in-state rate

Please pay $ 720

Are you in-state students? [y/n] n

How many credit hours are you taking? 17

You are paying out-of-state rate

Please pay $ 3000

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!