subject

Edhesive 7.5 code practice. The hint says "Hint: Make sure to use two functions to incorporate the last lesson and the current one—the GPAcalc() function and a new one."
So there needs to be two def functions for there to be a pass.
Im providing my code from the last lesson if you want to use it as a starter and just edit it:
def GPAcalc(g, w):

if g == "a" or g == "A":
return 4 + w
elif g == "B" or g == "b":
return 3 + w
elif g == "C" or g == "c":
return 2 + w
elif g == "D" or g == "d":
return 1 + w
elif g == "F" or g == "f":
return 0 + w
else:
return "Invalid"

#MAIN
grade = input("Enter your Letter Grade: ")
weight = int(input("Is it weighted? (1 = yes, 0 = no)"))
gpa = GPAcalc(grade, weight)
print("Your GPA score is: " + str(gpa))


Edhesive 7.5 code practice.

The hint says Hint: Make sure to use two functions to incorporate th

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 10:10
3. bob is arguing that if you use output feedback (ofb) mode twice in a row to encrypt a long message, m, using the same key each time, it will be more secure. explain why bob is wrong, no matter what encryption algorithm he is using for block encryption (15 points).
Answers: 3
question
Computers and Technology, 23.06.2019 23:40
4. what is the reason for including the following code snippet in the header file animal.h? #ifndef animal_h #define animal_h class animal { public: animal(); animal(double new_area_hunt); void birth(); void hunt(double new_area_hunt); void death(); double get_area_hunt() const; private: double area_hunt; }; #endif
Answers: 3
question
Computers and Technology, 24.06.2019 18:00
Why is a multiview sketch drawinf different from other sketches like isometric, two point, and oblique
Answers: 1
question
Computers and Technology, 24.06.2019 22:10
In command prompt, whats a command that will list only .ini files in c: \windows\system32 directory?
Answers: 1
You know the right answer?
Edhesive 7.5 code practice. The hint says "Hint: Make sure to use two functions to incorporate the...
Questions
question
Mathematics, 04.11.2020 21:40
question
Business, 04.11.2020 21:40
question
Arts, 04.11.2020 21:40
question
Mathematics, 04.11.2020 21:40
question
Mathematics, 04.11.2020 21:40
question
Mathematics, 04.11.2020 21:40
question
Physics, 04.11.2020 21:40
question
English, 04.11.2020 21:40