Question

Question 2 In the following flow.chart, what should the value of be inside the condition in order for us to print the numbe
0 0
Add a comment Improve this question Transcribed image text
Answer #1

7

If we set the condition to i<=7, the variable i will go from 1 to 7 and print 1 to 7. When it reaches 8, the condition i<=7 will fail and it will skip the rest. So, the output will be 1 to 7, as required.

Add a comment
Know the answer?
Add Answer to:
Question 2 In the following flow.chart, what should the value of " be inside the condition...
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
  • Question 21 The loop condition can be a complex condition involving several operators. True OR False...

    Question 21 The loop condition can be a complex condition involving several operators. True OR False Question 22 final int MAX = 25, LIMIT = 100; int num1 = 12, num2 = 25, num3 = 87; if(num3-5 >= 2*LIMIT) { System.out.println ("apple"); } else { System.out.println ("orange"); } System.out.println("grape"); What prints? A. Apple B. Orange C. Grape D. apple grape E. orange grape F. Nothing. Question 23 When we use a while loop, we always know in advance how many...

  • PYTHON PART 1) SIMPLE IF STATEMENTS INSIDE A LOOP. The first part of your program should...

    PYTHON PART 1) SIMPLE IF STATEMENTS INSIDE A LOOP. The first part of your program should do the following: • Write a section of code that prints off the numbers from 50 to 100. • It should also print off the letter grade that goes with that number on the same line using an if statement o 0 – 59 = F o 60 – 69 = D o 70 – 79 = C o 80 – 89 = B...

  • LANGUAGE = C i. Write a program that takes int numbers from user until user gives...

    LANGUAGE = C i. Write a program that takes int numbers from user until user gives a sentinel value (loop terminating condition). Sort the numbers in ascending order using Insertion sort method. Sorting part should be done in different function named insertionSort(). Your code should count the number of swaps required to sort the numbers. Print the sorted list and total number of swaps that was required to sort those numbers. (4 marks) ii. In this part take another number...

  • 1. Using logical operators modify the following Python "if" statement to print ("AND operator condition worked")?...

    1. Using logical operators modify the following Python "if" statement to print ("AND operator condition worked")? x=2 y=3 if (x<=2 or y>=3) and (x>2 or y<2): print("AND operator condition worked") else: print("it doesn't work") 2. Write a program that asks user for five numbers and returns the largest of them. Do not use max function built in python.

  • Inside of the class, Asg1Part2, write a main method that computes the sum of the numbers...

    Inside of the class, Asg1Part2, write a main method that computes the sum of the numbers from 1 to 100. Print that sum with a message. Run the main method (run class Asg1Part2). Check that the output is correct. Inside of class Asg1Part2, add additional code to the main method to ALSO compute the sum of the numbers from 1 to 2000 that are evenly divisible by 13. Print that sum with a message. Run the class Asg1Part2 (main method...

  • using Java program QUESTION 1 In a for statement, if the continuation condition is blank, the...

    using Java program QUESTION 1 In a for statement, if the continuation condition is blank, the condition is assumed to be True False QUESTION 2 What is the output of the following code: for (; false;) System.out.println("Welcome to Java"); prints out Welcome to Java forever Oprints out Welcome to Java one time Oprints out Welcome to Java two times does not print anything

  • what can we see on ECG with this condition OR what dysrhythemia correspond with following condition...

    what can we see on ECG with this condition OR what dysrhythemia correspond with following condition and what medication or action should be taken how do we diagnose 1) AMI 2) complication r/t MI 3) STEMI 4) Nonstemi please type the answers and don't guess the answer

  • What is a "sentinel value"? What is the format for a while loop? What is the...

    What is a "sentinel value"? What is the format for a while loop? What is the format for a do-while loop? .Write some instructions which will read a series of numbers (type double) and add them to a total until the number -1 is entered The - 1 is not added to the total. Write some instructions which will read a series of numbers (type double) and add them to a total until the character control-d is entered. Write a...

  • 10. What type of friction is described by ß = 2? 11. For what condition can...

    10. What type of friction is described by ß = 2? 11. For what condition can the value of ß be less than 1? 12. What is the Reynolds number? 13. What is the commonly estimated range of Reynolds numbers for the transitional regime in open-channel flow?

  • python print ("num=", num) 12. (2) The following loop should print the squares of the odd...

    python print ("num=", num) 12. (2) The following loop should print the squares of the odd numbers never ends. What is the error and how could it be fixed? num = 1 while num != 12: print (num ** 2) num += 2

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