Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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

Fundamentals Of Database Systems

Authors: Ramez Elmasri, Sham Navathe

4th Edition

0321122267, 978-0321122261

More Books

Students also viewed these Databases questions

Question

Demonstrated skills in Microsoft Office Suite

Answered: 1 week ago