Question

In flowcharting, the repetition structure is different from the sequence and decision structures by having _____________....

In flowcharting, the repetition structure is different from the sequence and decision structures by having _____________.

an arrow that points from bottom back to the top of the chart

a diamond

a parallelgram

an arrow that points downwards towards the end

How many times will the print statement be executed in the following code?

i = 1

while i <= 5:

j = 1

while j <= 5:

print ('Hello')

j = j + 1

i = i + 1

1

5

10

The while loop is a ______________ type of loop because it first checks checks a condition before executing the statements in the repetition structure.

no-test

post-test

pre-test

ensure-test

The following for loop iterates ___________ times to draw a square.

   for x in range(4):

   turtle.forward(200)

   turtle.right(90)

90

200

800

4

Which of the following statements is different from the others assuming a number has already been assigned to variable num?

num = num + 5

y = num + 5

num += 5

x = 5

num = num + x

_______________ is a special value that marks the end of a sequence of items processed in a loop. The value is the same type as the data but outside correct data range.

counter

yes-or-no

sentinel

flag

25

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Question#1

diamond

Question#2

25

Question#3

Pre test loop

Question#4

4 times

Question#5

y=num+5

PLEASE GIVE A THUMBS UP!!!!!! DONT GIVE A THUMBS DOWN IF YOU HAVE ANY QUERY PLEASE COMMENT DOWN I WILL CLEAR IT FOR YOU

Add a comment
Know the answer?
Add Answer to:
In flowcharting, the repetition structure is different from the sequence and decision structures by having _____________....
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Class: C++ Final Exam Dates Multiple Choice Identify the choice thar best completes the statement or...

    Class: C++ Final Exam Dates Multiple Choice Identify the choice thar best completes the statement or answer the question N 1. In s tructures, the computer repeats particular statements a certain number of times depending on some condition(s) a. looping C. selection b. branching d. sequence 2. What is the output of the following CH code? count = 1; num - 25; while (count < 25) numnum - 1: count++; cout << count << " " << num << endl;...

  • Form B 29. Which of the following statements about the continue statement is true a. The...

    Form B 29. Which of the following statements about the continue statement is true a. The continue statement is used to exit a repetition structure early and continue the execution of the statements following the loop. b. The continue statement is used to continue after a switch statement c. The continue statement does not alter the flow of control d. A continue statement proceeds with the next iteration of the immediately enclosing loop. e. None of the above 30. Inside...

  • х сув мм Full Name (Print please) ITM 330 Final Exam. Fall 2018 Multiple Choice (questions...

    х сув мм Full Name (Print please) ITM 330 Final Exam. Fall 2018 Multiple Choice (questions 1- 41,2 points each. Mark your answer on the Scantron for these questions) 1. Consider the following code segment, how many times the while loop iterates? the Sum 10 number input('Enter a number:') while int number): thesum float(number) number int(number) - 1 None Zero or more None of the above b. At least one Ten 2. Pseudocode is an) a) hybrid language of all...

  • LAB5 #1. Method and loop Write a method integerPower(base, exponent) that returns the value of baseexponent...

    LAB5 #1. Method and loop Write a method integerPower(base, exponent) that returns the value of baseexponent (2 pts). For example, integerPower(3, 4) returns 81. Assume thatexponent is a positive nonzero integer, and base is an integer. Method integer should use for or while loop to control the calculation. Do not use any Math library methods. Incorporate this method into a program class and invoke this method with different combinations of input values at least 4 times. Please use printf() method...

  • Questin 1 (CO 2) Which of the following is not a valid name in python? last_name...

    Questin 1 (CO 2) Which of the following is not a valid name in python? last_name lastName last name lname Question 2 (CO 3) How many times will “Hello World” be displayed after the following code executes? num=2 while num<12:     print("Hello world")     num+=2 2 12 5 4 Question 3 (CO 1) The following code contains an error, what type of error is it and what line number is it? 1 count=1 2 while count<4 3    print("count = ",...

  • Consider the following C++ program. It reads a sequence of strings from the user and uses...

    Consider the following C++ program. It reads a sequence of strings from the user and uses "rot13" encryption to generate output strings. Rot13 is an example of the "Caesar cipher" developed 2000 years ago by the Romans. Each letter is rotated 13 places forward to encrypt or decrypt a message. For more information see the rot13 wiki page. #include <iostream> #include <string> using namespace std; char rot13(char ch) { if ((ch >= 'a') && (ch <= 'z')) return char((13 +...

  • Instructions: Consider the following C++ program. It reads a sequence of strings from the user and...

    Instructions: Consider the following C++ program. It reads a sequence of strings from the user and uses "rot13" encryption to generate output strings. Rot13 is an example of the "Caesar cipher" developed 2000 years ago by the Romans. Each letter is rotated 13 places forward to encrypt or decrypt a message. For more information see the rot13 wiki page. #include <iostream> #include <string> using namespace std; char rot13(char ch) { if ((ch >= 'a') && (ch <= 'z')) return char((13...

  • Undecimal to decimal&decimal to undecimal #Your code here Thank you! Binary-to-Decimal In a previous lab, we...

    Undecimal to decimal&decimal to undecimal #Your code here Thank you! Binary-to-Decimal In a previous lab, we considered converting a byte string to decimal. What about converting a binary string of arbitrary length to decimal? Given a binary string of an arbitrarily length k, bk-1....bi .box the decimal number can be computed by the formula 20 .bo +21.b, + ... + 2k-1. bx-1- In mathematics, we use the summation notation to write the above formula: k- 2.b; i=0) In a program,...

  • whats the answers What are the values of i for each iteration of: for (i =...

    whats the answers What are the values of i for each iteration of: for (i = 0; i < 6; ++i) { } 1 2 3 4 5 O 012345 0 0 1 2 3 4 5 6 1 2 3 4 5 6 For the following code, indicate how many times the loop body will execute for the following input values: 2 1 0? userNum = 3; while (userNum > 0) { // Do something // Get user Num...

  • Question 1 An array is NOT: A - Made up of different data types. B - Subscripted by integers. C -...

    Question 1 An array is NOT: A - Made up of different data types. B - Subscripted by integers. C - A consecutive group of memory chunks. D - None of the choices. Question 2 How many times is the body of the loop executed? int i=1; while(true) { cout << i; if(++i==5) break; } A - Forever B - 4 C - 5 D - 6 E - 0 Question 3 What is wrong with the following piece of...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT