subject

When breaking a problem down, you often encounter elements that you want to use repeatedly in your code. sometimes it's appropriate to write a new function; at other times it's appropriate to write a loop. what do you think? what kinds of circumstances would lead you to writing a function versus using a loop? show the output and hand trace the values of the variables during each iteration of the loops below. a. declare integer counter = 1while counter < 60display counterset counter = counter + 10end whileb. declare integer counter = 10while counter > 0set counter = counter - 2display counterend whilec. declare integer counterconstant integer max_value = 10for counter = 1 to max_value step 2display counterend for

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 14:30
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
question
Computers and Technology, 23.06.2019 03:30
Ihave a singular monitor that is a tv for my computer. recently, i took apart my computer and put it back together. when i put in the hdmi cord and booted the computer to see if it worked, the computer turned on fine but the screen was blue with "hdmi no signal." i've tried everything that doesn't require buying spare parts, any answer is appreciated!
Answers: 1
question
Computers and Technology, 23.06.2019 15:00
Barbara is interested in pursuing a career in the science and math pathway. which qualifications will her reach that goal? a.an advanced knowledge of physics and math b.an advanced knowledge of engineering and math c. an advanced knowledge of physics and robotics an d. advanced knowledge of machinery and math
Answers: 1
question
Computers and Technology, 23.06.2019 15:30
The processing of data in a computer involves the interplay between its various hardware components.
Answers: 1
You know the right answer?
When breaking a problem down, you often encounter elements that you want to use repeatedly in your c...
Questions
question
Mathematics, 22.01.2020 10:31
question
Physics, 22.01.2020 10:31
Questions on the website: 13722367