128k views
5 votes
Write a program for the Pass-Em State College bursar to compute for each semester the tuition for each student. If a student is taking 12 credits or less, tuition is $525 per credit. If a student is taking more than 12 credits, the total tuition is $6300. Note: Use the format for arithmetic

1 Answer

0 votes

Answer:

students = int(input("How many students? "))

for i in range(students):

credits = int(input("Enter credits: "))

if credits <= 12:

tuition = credits * 525

else:

tuition = 6300

print("Tuition is $%.2f" % tuition)

Step-by-step explanation:

Ask the user to enter the number of students

Create a for loop that iterates for each student

Ask the user to enter the credits

Check the credits. If it is smaller than or equal to 12, calculate the tuition as credits * 525. Otherwise, set the tuition as 6300

Print the tuition

User Chatpitau
by
4.3k points