Reference no: EM131386550
A high school senior is applying for colleges. He wants a program to calculate the out-of-pocket cost for attending each college he is applying. The out-of-pocket cost is determined by the following formula:
Out-of-pocket cost = tuition + room + board + other expenses - financial aid
Write a program to calculate the out-of-pocket cost of every college he is applying. After each college, ask the user whether to calculate cost for another college. Enter 'y' for yes. The following is an example:
Enter name of college: Wake Tech
Enter tuition: 8500
Enter room: 6000
Enter board: 4000
Enter other expenses: 3000
Enter financial aid: 2000
Out-of-pocket cost for this college: 19500
Calculate cost for another college? [y/n] y
Enter name of college: Jefferson College
Enter tuition: 35000
Enter room: 7000
Enter board: 4500
Enter other expenses: 5000
Enter financial aid: 22000
Out-of-pocket cost for this college: 29500
Calculate cost for another college? [y/n] y
Enter name of college: Freedom University
Enter tuition: 20000
Enter room: 10000
Enter board: 5000
Enter other expenses: 5000
Enter financial aid: 30000
Out-of-pocket cost for this college: 10000
Calculate cost for another college? [y/n] n
Save your Python program in a file named Lab04P1.py. Submit the file to Blackboard for credit.
Problem 2
We wrote the following program to calculate BTU needed to cool a room.
roomLength = float(input('Enter room length: '))
roomWidth = float(input('Enter room width: '))
roomHeight = float(input('Enter room height: '))
roomVolume = roomLength * roomWidth * roomHeight
btuNeeded = roomVolume * 3.5
print('BTU needed for this room:', btuNeeded)
Modify the program by adding error checking loops. Room length, width and height must all be greater than 0. Every time the user enters a negative number, display an error message and ask the user to re-enter a valid value immediately.
What is the concept of data compression
: What is the concept of data compression? Define a type of data compression and the steps involved.
|
Is the contract covered by the ucc
: The electric company argues that the electricity passing through the transmission wire was not being sold to Prince and that, therefore, there was no sale of goods to Prince. Is the contract covered by the UCC?
|
Discuss about the post given below
: Human trafficking can be one of the most obscene and heinous criminal offenses that subjects men, women and children of all ages to exploitation of sex and disregard for basic human rights. According to the Department of Homeland Security, Human T..
|
Can custom and trade usage be used to interpret
: HMT responds that the quantity term in the contract was definite and unambiguous. Can custom and trade usage be used to interpret an unambiguous contract? Discuss.
|
Calculate the out-of-pocket cost of every college
: Write a program to calculate the out-of-pocket cost of every college he is applying. After each college, ask the user whether to calculate cost for another college. Enter 'y' for yes. The following is an example:
|
What is the combined demand
: You have been put in charge of pricing for a monopolist. Assume that the marginal cost is zero (0). It is known that there are two consumers. Consumer I has a demand of q^d = 6 - p. What is the combined demand (use a demand schedule)? What is the opt..
|
Draw the locking receptacle for the alarm system
: Draw the locking receptacle (Fig. 26-7) for the alarm system to be installed in the administration building. Create Three: Right viewports in paper space, and show the top and front views. In the large right viewport, show the SW isometric view. P..
|
Is the contract enforceable in the given condition
: Four months later, when the price of cotton had doubled, Loeb & Co. sought to enforce the contract. Schreiner argues that he is not a merchant. Is the contract enforceable?
|
Explain what is meant by the term distribution policy
: What is meant by the term "distribution policy"? How has the mix of dividend payouts and stock repurchases changed over time?
|