def GPAcalc(grade, weighted):
grade = grade.lower()
dictionary = {"a": 4, "b": 3, "c": 2, "d": 1, "f": 0}
if weighted == 1 and grade in dictionary:
return "Your GPA score is: "+str(dictionary[grade] + 1)
elif weighted == 0 and grade in dictionary:
return "Your GPA score is : "+str(dictionary[grade])
else:
return "Invalid"
print(GPAcalc(input("Input a letter grade: "), int(input("Is it weigthed? (1= yes, 0= no)"))))
I modified the code a bit to cut down on the use of if and elif statements. If you need me to change it, I will. Best of luck.
Giga usually means 10^9
We're trying to work giba, which is 2^30 into the vocabulary to differentiate them because of the confusion and difference that they create.
A liquid-to-liquid heat exchanger uses a heat-transfer fluid that circulates through the solar collector, absorbs heat, and then flows through a heat exchanger to transfer its heat to water in a storage tank. Heat-transfer fluids, such as antifreeze, protect the solar collector from freezing in cold weather.