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.
In Windows a (real) backslash is a path separator. The % is involved with DOS variables.
Answer:
What is the definition of technology addiction?
Technology addiction is defined as the uncontrollable overuse of technological devices including smart phones, computers, and gaming systems. ... Individuals suffering from technology addiction often display both behavioral and physical symptoms.
Explanation:
Technology addiction can be defined as frequent and obsessive technology-related behavior increasingly practiced despite negative consequences to the user of the technology. An over-dependence on tech can significantly impact students' lives.
Answer:
The Turing Test is a deceptively simple method of determining whether a machine can demonstrate human intelligence
Explanation: