Computers and Technology
Computers and Technology, 20.08.2020 18:01, lizzynmk

Read the following code, written to calculate an average: def main(): num1 = 85 num2 = 95 num3 = 91 average = num1 + num2 + num3 / 3 print("Average: " + str(average)) main() Which line of code has an error and why? average = num1 + num2 + num3 / 3; It does not use quotation marks to indicate the string literal. average = num1 + num2 + num3 / 3; It does not follow the proper order of operations. print("Average: "str(average)); It requires an equal sign to properly calculate the output. print("Average: "str(average)); It requires a float() function to properly display the output

answer
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 14:30, qxchung7310
The “rule of 72” is used to approximate the time required for prices to double due to inflation. if the inflation rate is r%, then the rule of 72 estimates that prices will double in 72/r years. for instance, at an inflation rate of 6%, prices double in about 72/6 or 12 years. write a program to test the accuracy of this rule. for each interest rate from 1% to 20%, the program should display the rounded value of 72/r and the actual number of years required for prices to double at an r% inflation rate. (assume prices increase at the end of each year.)
Answers: 1
image
Computers and Technology, 22.06.2019 18:00, abbygriffin2009
Martha is a healer, a healthcare provider, and an experienced nurse. she wants to share her daily experiences, as well as her 12 years of work knowledge, with people who may be interested in health and healing. which mode of internet communication can martha use?
Answers: 3
image
Computers and Technology, 23.06.2019 04:00, terrell31
Write a method that takes in an array of point2d objects, and then analyzes the dataset to find points that are close together. be sure to review the point2d api. in your method, if the distance between any pair of points is less than 10, display the distance and the (x, y)s of each point. for example, "the distance between (3,5) and (8,9) is 6.40312." the complete api for the point2d adt may be viewed at ~pf/sedgewick-wayne/algs4/documenta tion/point2d. html (links to an external site.)links to an external site.. try to write your program directly from the api - do not review the adt's source code.
Answers: 1
image
Computers and Technology, 23.06.2019 06:30, jayjay5246
Which option correctly describes a dbms application? a. software used to manage databases b. software used to organize files and folders c. software used to develop specialized images d. software used to create effective presentations
Answers: 1
Do you know the correct answer?
Read the following code, written to calculate an average: def main(): num1 = 85 num2 = 95 num3 = 91...

Questions in other subjects:

Konu
History, 04.08.2019 08:40