This essay proves that use programming for almost everything.you’ve never learned to before it you might be wondering what programming
on a computer science question and need guidance to help me understand better.
1. Consider the following pseudocode.
i = 0sum = 0REPEAT UNTIL i = 4 i = 1 sum++DISPLAY sum
What is the output?
Nothing – infinite loop.
The number 4 is displayed.hi welcome to programming if you’ve never learned to program before it you might be wondering what
a we’re giving the computer a series of commands that kind of look like a weird form of English you can think of a computer as a very obedient dog listening to your every command and doing whatever you tell it to do so what’s so cool about well it really depends on what you think is cool because as it turns out you can use for almost everything programs control robots that can take care of patients and my favorite robots that can roam around Mars and look for water on the surface
which way to turn which is pretty important programs help doctors cure diseases by processing huge amounts of medical data programs can be really fun games like doodle jump Angry Birds minecraft make it possible for Pixar to put out
The number 0 is displayed.
The number 1 is displayed.
2. To have a set of command execute multiple times in a program, you would want to use a loop. What types of loops are available in ?
3. Consider the following code:
sum = 0j = 0DO WHILE j < 3 DISPLAY (“Enter any number between 1 and 100”) INPUT num IF(num >= 1 AND <= 100) sum = sum + num ENDIFEND DO WHILEavg = sum / j
With inputs of 0, -1, 4, 8 and 12, what will be the output?
An infinite loop
A correct average
An incorrect average