
R While Loop Flashcard
Flashcard
•
Computers
•
11th Grade
•
Hard
Wayground Content
FREE Resource
Student preview

10 questions
Show all answers
1.
FLASHCARD QUESTION
Front
What is the purpose of loops in programming?
Back
To execute a block of code multiple times
2.
FLASHCARD QUESTION
Front
Which of the following is a loop command in R? if, else, while, switch
Back
while
3.
FLASHCARD QUESTION
Front
What will the following R code print?
i <- 1
while (i < 6) {
print(i)
i <- i + 1
}
Back
1 2 3 4 5
4.
FLASHCARD QUESTION
Front
What does the 'break' statement do in a loop?
Back
Stops the loop immediately
5.
FLASHCARD QUESTION
Front
In the context of loops, what does the 'next' statement do?
Back
Skips the rest of the current iteration
6.
FLASHCARD QUESTION
Front
What will the following R code print?
i <- 1
while (i < 6) {
if (i == 4) {
break
}
print(i)
i <- i + 1
}
Options: 1 2 3, 2 3 4 5, 1 2 3 4, 1 2 3 4 5
Back
1 2 3
7.
FLASHCARD QUESTION
Front
What is the output of this R code?
i <- 0
while (i < 6) {
i <- i + 1
if (i == 3) {
next
}
print(i)
}
Back
1 2 4 5 6
Create a free account and access millions of resources
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
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?
Similar Resources on Wayground
10 questions
Common Phrasal Verbs and Their Meanings
Flashcard
•
10th Grade - University
8 questions
Legal Terms Flashcards
Flashcard
•
KG
10 questions
Fun Science Flashcards for Kids
Flashcard
•
KG
10 questions
Essential Statistics Concepts
Flashcard
•
12th Grade
10 questions
R2.3 How Far? Le Chatelier's Principle
Flashcard
•
12th Grade
10 questions
High Note 2. Unit 1. Test your vocabulary
Flashcard
•
10th Grade
10 questions
Викторина по алгоритмическим конструкциям ветвления
Flashcard
•
11th Grade
Popular Resources on Wayground
20 questions
Halloween Trivia
Quiz
•
6th - 8th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
15 questions
Order of Operations
Quiz
•
5th Grade
20 questions
Halloween
Quiz
•
5th Grade
16 questions
Halloween
Quiz
•
3rd Grade
12 questions
It's The Great Pumpkin Charlie Brown
Quiz
•
1st - 5th Grade
20 questions
Possessive Nouns
Quiz
•
5th Grade
10 questions
Halloween Traditions and Origins
Interactive video
•
5th - 10th Grade
Discover more resources for Computers
20 questions
Halloween movies trivia
Quiz
•
7th - 12th Grade
15 questions
Halloween Characters
Quiz
•
7th - 12th Grade
10 questions
Halloween Movies Trivia
Quiz
•
5th Grade - University
14 questions
Halloween Fun
Quiz
•
2nd - 12th Grade
28 questions
Ser vs estar
Quiz
•
9th - 12th Grade
21 questions
Halloween & Math
Quiz
•
8th - 12th Grade
13 questions
Halloween Movie Trivia
Quiz
•
9th - 12th Grade
7 questions
Halloween - Myths & Legends
Interactive video
•
10th - 12th Grade