
For/While Loops
Authored by Techie Potato
Computers
Used 1+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
6 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
You need a program that will keep letting you add money to a piggy bank until you get to $10,000. Which kind of loop should be used?
FOR Loop
WHILE Loop
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
You want to print the numbers from 1 to 10 in ascending order. Which loop should be used?
For Loop
While Loop
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
You want to keep asking the user for their name until they enter a valid name that is not empty or contains only spaces. Which loop should be used?
For Loop
While Loop
4.
MULTIPLE SELECT QUESTION
45 sec • 1 pt
You want to calculate the factorial of a given number n, which is the product of all positive integers less than or equal to n. For example, the factorial of 5 is 5 x 4 x 3 x 2 x 1 = 120. Which loop would you use?
You want to calculate the factorial of a given number n, which is the product of all positive integers less than or equal to n. For example, the factorial of 5 is 5 x 4 x 3 x 2 x 1 = 120. Which loop would you use?
For Loop
While Loop
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
You want to find the smallest positive integer that is divisible by both 7 and 13. Which loop should be used?
For Loop
While Loop
6.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
Look at the following code snippet, what will it generate?
1,2,3,4
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
10 questions
Tree and Planar Graph
Quiz
•
University
10 questions
CodeMonkey for B.Ed IT
Quiz
•
University
10 questions
Word 2016 Basics - Saving Document, Page Layout, Header & Foot
Quiz
•
7th Grade
10 questions
VPN
Quiz
•
1st - 5th Grade
10 questions
Understanding Email, Contacts and Calendaring
Quiz
•
University
10 questions
Q1 M 2 - TOPIC 2 / Check your understanding
Quiz
•
10th Grade
11 questions
ICT - Networks and communication
Quiz
•
9th Grade
10 questions
Arduino
Quiz
•
7th - 12th Grade
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade