subject

Tiffany is writing a program to help manage a bake sale. She writes the following code which prompts the user to enter the total number of items a person is buying and then a loop repeatedly prompts for the cost of each item. She wrote the code but there is a problem: it runs in an infinite loop. How can Tiffany change her code so it doesn't loop forever?line 0 -- var numItems = promptNum("How many items?");line 1-- var total = 0;line 2-- while (numItems > 0){line 3-- total = total + promptNum("Enter next item price");line4-- }line 5-- console. log("The total is" + total);A) Change Line 1 to:var total = -1;B) Change Line 2 to:while (itemsInCart >= 0){C) Change Line 3 to:total = promptNum("Enter next item price");D) Add after line 3:numItems = numItems - 1;E) Add after line 4:numItems = 0;

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 00:30
At an open or uncontrolled intersection, yield if a. your road is paved and the crossroad is not b. the cross road is paved and yours is not c. you have two or more passengers in your vehicle d. you did not yield in the last intersection
Answers: 1
question
Computers and Technology, 22.06.2019 05:10
Read the code below. what will the computer print if the input for year_variable is 1700? if year_variable == 1776: print("your answer is correct. the declaration of independence was signed in “year_variable”.") elif year_variable < 1776: compute_variable = 1776 - year_variable. print("add “compute_variable“ years to your answer for the correct answer.") elif year_variable > 1776: compute_variable = year_variable - 1776 print("subtract “compute_variable” years from your answer for the correct answer.")
Answers: 1
question
Computers and Technology, 22.06.2019 11:30
Andrina writes letters that are regularly sent to hundreds of her company’s customers. because of this, she would like for the mail merge command to be in her quick access toolbar, and she wants it to be the first button on the left. what should andrina do to place the mail merge button there?
Answers: 1
question
Computers and Technology, 23.06.2019 04:20
Which network media uses different regions of the electromagnetic spectrum to transmit signals through air? uses different regions of the electromagnetic spectrum to transmit signals through air.
Answers: 2
You know the right answer?
Tiffany is writing a program to help manage a bake sale. She writes the following code which prompts...
Questions
Questions on the website: 13722361