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, 23.06.2019 01:30
How do you set up a slide show to play continuously, advancing through all the slides without requiring your interaction? a. click set up slide show, and then select the loop continuously until ‘esc' and show without narration options. b. click set up slide show, and then select the loop continuously until ‘esc' and use timings, if present options. c. click set up slide show, and then select the show presenter view and use timings, if present options. d. click set up slide show, and then select the show without animation and browsed at a kiosk (full screen) options.
Answers: 3
question
Computers and Technology, 23.06.2019 11:00
This chapter lists many ways in which becoming computer literate is beneficial. think about what your life will be like once you’re started in your career. what areas of computing will be most important for you to understand? how would an understanding of computer hardware and software you in working from home, working with groups in other countries and contributing your talents.
Answers: 1
question
Computers and Technology, 24.06.2019 07:30
Jason is working on a microsoft excel worksheet and he wants to create a print preview shortcut. his teacher asks him to access the customization option to create the new shortcut. which two tabs should jason select to place the print preview shortcut on the worksheet toolbar? a. new tab (custom) and new group (custom) b. new file tab (custom) and new tab (custom) c. new custom group and new command d. new custom tab and new command
Answers: 2
question
Computers and Technology, 24.06.2019 16:50
7.23 main lab 7 - online shopping cart background this main lab extends the earlier prep lab "online shopping cart part 1". (you should save this as a separate project from the earlier prep lab). you will create an on-line shopping cart like you might use for your on-line purchases. the goal is to become comfortable with setting up classes and using objects. requirements this lab can be done individually or as pair programming. expanded itemtopurchase class (15 points) extend the itemtopurchase class as follows. we will not do unit testing in this lab so we will not be giving you the names of the member functions. create good ones on your own. create a parameterized constructor to assign item name, item description, item price, and item quantity (default values of "none" for name and description, and 0 for price and quantity). additional public member functions set an item description get an item description print the cost of an item - outputs the item name followed by the quantity, price, and subtotal (see example) print the description of an item - outputs the item name and description (see example) additional private data members a string for the description of the item. example output of the function which prints the cost of an item: bottled water 10 @ $1.50 = $15.00 example output of the function which prints the item description:
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, 12.06.2021 01:00
question
Geography, 12.06.2021 01:00
Questions on the website: 13722363