Question

In: Computer Science

For this program you will be looking at future tuition at your university. In 2020, the...

For this program you will be looking at future tuition at your university. In 2020, the tuition for a full time student is $6,549 per semester, the tuition for a part time student is $3,325. The tuition will be going up for the next 7 years at a rate of 3.5% per year. Write a program using if-else and a loop. Ask the user if they are a full time or part time student, then display the projected semester tuition for the next 7 years. You should display the actual year (2021, 2022, through 2027) and the tuition amount per semester for that year. REMEMBER to write your name through comments in the program, and use comments to explain what your program is doing. Please write the program in "script" mode

Solutions

Expert Solution

We can solve this problem using Python script. To check if the student is full time or part time employee can be decided using an if...else condition and the tuition for seven years can be displayed using a for loop.

SOLUTION

# global variables to store the full time and part time tuition
# ftt - full time tuition
# ptt - part time tuition
ftt = 6549
ptt = 3325
# rate of increase each year
rate = 3.5/100


# function to calculate rise in amount
# this function returns 3.5% increased amount rounded off to two decimal places
def calc_tuition_rise(tuition):
    return round(tuition + (tuition * rate), 2)


# function to interact and display tuition
def future_tuition():
    current_tuition = 0
    year = 2021
    # get user input
    response = input("Are you full time(ft) or part time(pt) student: ")

    # based on user input assign the current tuition value
    if response.lower() == "ft" or response.lower() == "full time":
        current_tuition = ftt
    else:
        current_tuition = ptt

    # iterate using a for loop and display tuition for seven years
    print("Tuition fees per semester for each year as follows:")
    for i in range(7):
        current_tuition = calc_tuition_rise(current_tuition)
        print(f'{year + i}: ${current_tuition}')


# invoke the function
future_tuition()

SCREENSHOT FROM IDE


Related Solutions

For this program you will be looking at future tuition at your university. In 2020, the...
For this program you will be looking at future tuition at your university. In 2020, the tuition for a full time student is $6,549 per semester, the tuition for a part time student is $3,325. The tuition will be going up for the next 7 years at a rate of 3.5% per year. Write a program using if-else and a loop. Ask the user if they are a full time or part time student, then display the projected semester tuition...
Branching Program write a program to do the following: A university needs to compute the tuition...
Branching Program write a program to do the following: A university needs to compute the tuition of its students. They will ask for the name, the number of units the student is taking, and their residency status. R=resident , N = non- resident. The tuition to be computed as follows: non-resident students pay $100 per unit; resident students pay $50 per unit if they take 12 or units or more and $75 per unit if they take less than 12...
Why are you looking to pursue an MBA or MS program at this point in your...
Why are you looking to pursue an MBA or MS program at this point in your life and what do you see yourself doing professionally upon graduation? What key actions have you taken up to this point to prepare you for this career? 500 words
Looking forward to current and future needs in your own industry or one in which you...
Looking forward to current and future needs in your own industry or one in which you desire to work, describe how the more advanced SQL server integration services (SSIS) data migration software, SQL server analysis services (SSAS) online analytical processing technology, or SQL server reporting services (SSRS) report software could be useful for the industry's current needs as well as to propel growth. Justify your ideas with support from the Topic Materials or relevant industry examples.
You are currently part of a university work experience program. Your job placement is at the...
You are currently part of a university work experience program. Your job placement is at the municipal transit centre. Your supervisor is responsible for the recording and distribution of monthly transit passes to authorized vendors throughout the city. The vendors pay €50 per bus pass and sell them for €55. Your job is to prepare a monthly reconciliation of the transit passes including the quantity sold, the number actually distributed, the unsold passes, and the cash proceeds. You are unable...
Looking into the future, describe one future technology and how you believe programming languages will have...
Looking into the future, describe one future technology and how you believe programming languages will have to adapt to make that technology successful
During this course you will design a program for a state university. The university needs a...
During this course you will design a program for a state university. The university needs a website design that will enable students to order books online. Each week you will receive additional instructions for the elements of the design based on the needs of the university. The elements will correspond with the concepts and skills you learn that week. According to the university's website design request, students need to order five books, one for each of the five required courses...
You have just graduated from the MBA program of a large university, and one of your...
You have just graduated from the MBA program of a large university, and one of your favorite courses was “Today’s Entrepreneurs.” In fact, you enjoyed it so much you have decided you want to “be your own boss.” While you were in the master’s program, your grandfather died and left you $1 million to do with as you please. You are not an inventor and you do not have a trade skill that you can market; however, you have decided...
You have just graduated from the MBA program of a large university, and one of your...
You have just graduated from the MBA program of a large university, and one of your favorite courses was Today’s Entrepreneurs. In fact, you enjoyed it so much you have decided you want to “be your own boss.” While you were in the master’s program, your grandfather died and left you $1 million to do with as you please. You are not an inventor, and you do not have a trade skill that you can market; however, you have decided...
You have just graduated from the MBA program of a large university, and one of your...
You have just graduated from the MBA program of a large university, and one of your favorite courses was “Today’s Entrepreneurs.” In fact, you enjoyed it so much you have decided you want to “be your own boss.” While you were in the master’s program, your grandfather died and left you $1.5 million to do with as you please. You are not an inventor, and you do not have a trade skill that you can market; however, you have decided...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT