subject

Read the following code, written to calculate an average: def main():
num1 = 83
num2 = 75
num3 = 99

average = num1 + num2 + num3 / 3
print("Average: " + str(average))
main()

How can the average calculation be corrected in order to return the correct output?

Change the division symbol to the multiplication symbol
Place parentheses around the variables to indicate the order of operation
Place quotation marks around the variable names in order to make a string literal
Use the numeric values instead of variable names

ansver
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 04:40, debo4965
Amain idea is supported, explained, or expanded on with a numbers b. a concluding statement c. details d. a topic sentence. im e paragraphs reset nex next
Answers: 2
image
Computers and Technology, 22.06.2019 18:30, smariedegray
All of the following are characteristics that must be contained in any knowledge representation scheme except
Answers: 3
image
Computers and Technology, 23.06.2019 11:00, shawn20034
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
image
Computers and Technology, 23.06.2019 20:30, maryanapritchak1829
If chris has a car liability insurance, what damage would he be covered for
Answers: 1
You know the right answer?
Read the following code, written to calculate an average: def main():
num1 = 83
num2...

Questions in other subjects: