with open('celcius.dat', 'r') as fIn, open('fahrenheit.dat', 'w') as fOut:
for line in fIn:
fahrenheit = 9.0 / 5.0 * float(line) + 32
fOut.write("%.1f\n" % fahrenheit)
You can control the number of decimals in the formatting clause in the write statement.
Answer:
Apple users tend to like the company and love its products. Apple has successfully nurtured this Affective component of its customers' attitudes.
Explanation:
There are three component of attitudes, they include the behavioral component, the affective component and the cognitive component.
The affective component of attitude is concerned about the emotional response attached to an attitude. The affective component involves a person’s feelings / emotions about the attitude object. i.e it is basically concerned with the emotional reaction of a person or customer to a particular object or good.
Hence, apple users liking the company and loving its products shows that Apple has successfully nurtured the affective component of its customers' attitude.
Answer:
the answer is C
Explanation:
reporting tool because she has to report it before doing anything else.
Answer:
bill = float(input("Enter the bill amount: "))
rating = int(input("Choose a rating: 1 = Totally satisfied, 2 = Satisfied, 3 = Dissatisfied.: "))
if rating is 1:
tip = bill * 0.2
elif rating is 2:
tip = bill * 0.15
elif rating is 3:
tip = bill * 0.1
print("The rating is: " + str(rating))
print("The tip is: $%.2f" % (tip))
Explanation:
*The code is in Python
- Ask the user for the <em>bill</em> and <em>rating</em>
- Depending on the <em>rating</em>, calculate the <em>tip</em> using <u>if else</u> statement i.e. If the rating is chosen as 1, calculate the tip by taking 20 percent of the bill.
- Print the <em>rating</em> and the <em>tip</em>