Code.org - Unit 6 Lists, Loops, and Traversals

Flashcard
•
Computers
•
10th Grade
•
Hard
Wayground Content
FREE Resource
Student preview

12 questions
Show all answers
1.
FLASHCARD QUESTION
Front
A school is developing a program to keep track of information about students and their class schedules. In which of the following instances would a data abstraction be most helpful? The program includes individual variables to store the names of each student rather than a single list of students, A program includes multiple comments that could be combined into a single comment, A program includes repeated programming statements that could be moved inside a loop, A program includes repeated code that could be moved inside a function.
Back
The program includes individual variables to store the names of each student rather than a single list of students.
2.
FLASHCARD QUESTION
Front
var list = [10, 5, 15]; for(var i = 0; <INSERT CODE>; i++){ console.log(list[i]); Which of the following will result in ONLY all the items in list being printed to the console if placed where the program reads <INSERT CODE> and the program is run i < list[list.length], i < list.length, i < list[0], i < list[1]
Back
i < list.length
3.
FLASHCARD QUESTION
Front
wordList is a list of words that currently contains the values ["tree", "rock", "air"]. Which line will result in the list containing the values ["air", "rock", "air"]? Options: wordList[0] = wordList[2], wordList[2] = wordList[0], insertItem(wordList, 0, "air"), removeItem(wordList,0)
Back
wordList[0] = wordList[2]
4.
FLASHCARD QUESTION
Front
What will be displayed in the console when this program runs?
var numList = [10,20,30];
console.log(numList[numList.length-1]);
Back
30
5.
FLASHCARD QUESTION
Front
What will be displayed when this program finishes running?
var numbersList = [20, 10, 5]
appendItem(numbersList, 50)
appendItem(numbersList,100)
removeItem(numbersList,1)
insertItem(numbersList, 0, 30)
console.log(numbersList.length)
Back
5
6.
FLASHCARD QUESTION
Front
What will happen when the following code is executed? var count = 0 while (count != 5){ console.log(count); count = count + 2; }
Back
The program will result in an infinite loop
7.
FLASHCARD QUESTION
Front
for(var i = 0; i < 4; i++){ console.log(i); } What will be the output?
Back
0
1
2
3
Create a free account and access millions of resources
Similar Resources on Wayground
6 questions
Xbox vs Playstation

Flashcard
•
KG - Professional Dev...
10 questions
Nintendo Flashcard

Flashcard
•
KG - University
8 questions
Healthcare Careers Study Guide

Flashcard
•
9th Grade - University
12 questions
Nintendo Consoles and Games

Flashcard
•
KG - Professional Dev...
10 questions
Video Game Trivia - 3/5/2021

Flashcard
•
11th - 12th Grade
10 questions
Pearson 1CP2 - 3.2 - Utility Programs

Flashcard
•
9th - 12th Grade
6 questions
Understanding Loops and Lists

Flashcard
•
9th - 12th Grade
9 questions
CT FLASHCARD Mars 2025

Flashcard
•
KG - University
Popular Resources on Wayground
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
Appointment Passes Review

Quiz
•
6th - 8th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
20 questions
Grammar Review

Quiz
•
6th - 9th Grade
Discover more resources for Computers
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
17 questions
[AP CSP] Binary Number System

Lesson
•
9th - 12th Grade
15 questions
1.1 Network Fundamentals Quiz

Quiz
•
10th Grade
20 questions
Understanding Information Processing Cycle

Quiz
•
10th Grade
19 questions
AP CSP Unit 1 Review (code.org)

Quiz
•
10th - 12th Grade