The program that can display an appropriate error message if an invalid rating is illustrated below.
<h3>How to illustrate the program?</h3>
The program for the error message will be:
CONSTANTS
RAISE_FACTOR = 2400.00
UNACCEPTABLE = 0.0
ACCEPTABLE = 0.4
MERITORIOUS = 0.6
# input of user rating
rating = float(input('Enter your rating: '))
# based on rating display the performance and salary raise
if rating == UNACCEPTABLE:
print('Your performance was UNACCEPTABLE. Raise in salary: $%.2f' %(RAISE_FACTOR*UNACCEPTABLE))
elif rating == ACCEPTABLE:
print('Your performance was ACCEPTABLE. Raise in salary: $%.2f' %(RAISE_FACTOR*ACCEPTABLE))
elif rating == MERITORIOUS:
print('Your performance was MERITORIOUS. Raise in salary: $%.2f' %(RAISE_FACTOR*MERITORIOUS))
else: # invalid rating
print('Invalid Rating. Valid ratings are 0.0, 0.4 and 0.6')
Learn more about program on:
brainly.com/question/1786465
#SPJ1
Answer:
The pressure and volume of the tank are 4.74703 psi and 385.968 ft³ respectively.
Explanation:
Volume is constant as the tank is rigid. Take the saturation condition of water from the steam table for pressure at 160°F.
Given:
Mass of the water is 10 lb.
Dryness fraction is 0.5.
Temperature of water is 160°F.
From steam table at 160°F:
The pressure in the tank is 4.74703 psi.
Specific volume of saturated water is 0.0163918 ft³/lb.
Specific volume of saturated steam is 77.1773 ft³/lb.
Calculation:
Step1
From steam table at 160°F:
The pressure in the tank is 4.74703 psi.
Step2
Specific volume of tank is calculated as follows:
v=38.5968 ft³/lb.
Step4
Volume is calculated as follows:
V=385.968 ft³.
Thus, the pressure and volume of the tank are 4.74703 psi and 385.968 ft³ respectively.