
Lecture 2 Flashcard

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

13 questions
Show all answers
1.
FLASHCARD QUESTION
Front
Which of the following is not a data type from Python? Bool, NoneType, Tuple, Array
Back
Array
2.
FLASHCARD QUESTION
Front
Which built-in function determines the data type of a value? Options: varType(), type(), data(), dataType()
Back
type()
3.
FLASHCARD QUESTION
Front
What does type(None) return?
Back
NoneType
4.
FLASHCARD QUESTION
Front
T or F: Tuples can contain elements of different data types.
Ex: (4, 3.2, "6", "a")
Back
True
5.
FLASHCARD QUESTION
Front
Which of the following is the correct way to initialize a variable of type string then cast it to a float? Options: var = "8.0" var = float(var), str var = "8.0" var = float(var), var = "8.0" var = (float) var, str var = "8.0" var = (float) var
Back
var = "8.0" var = float(var)
6.
FLASHCARD QUESTION
Front
Which of the following accurately uses a for loop to print "hello world" some N times?
Options:
for (int j = 0; j<N; j+=1) {
print("hello world") }
,
for (int j = 0; j < N; j++):
print("hello world")
,
for j in range(N):
print("hello world")
,
for j in range(len(N)) {
print("hello world") }
Back
for j in range(N):
print("hello world")
7.
FLASHCARD QUESTION
Front
Which of the following accurately uses a while loop to count the number of even numbers from 0 to N (including N)?
Options:
count = 0
j = 0
while j<N+1:
if j%2 == 0:
count += 1
j += 1
,
count = 0
j = 0
while j<N:
if j%2 == 0:
count++
j++
,
count = 0
while j in range(N):
if j%2 == 0:
count += 1
,
count = 0
while j in range(N+1):
if j%2 == 0:
count += 1
Back
count = 0
j = 0
while j<N+1:
if j%2 == 0:
count += 1
j += 1
Create a free account and access millions of resources
Similar Resources on Wayground
15 questions
Kindergarten Counting

Flashcard
•
KG
10 questions
Counting & Cardinality for Kindergarten

Flashcard
•
KG
10 questions
Beginning sounds

Flashcard
•
KG
15 questions
Skip Counting By 10's

Flashcard
•
KG - 12th Grade
9 questions
Unit 5 -- Lists, Loops, Traversals

Flashcard
•
9th - 12th Grade
15 questions
Kindergarten Math

Flashcard
•
KG
16 questions
Counting 1-20

Flashcard
•
KG
16 questions
Math for Kindergarten

Flashcard
•
KG
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
9/11 Experience and Reflections

Interactive video
•
10th - 12th 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
9 questions
Tips & Tricks

Lesson
•
6th - 8th Grade
Discover more resources for Computers
20 questions
Digital Citizenship

Quiz
•
8th - 12th Grade
35 questions
Computer Baseline Examination 2025-26

Quiz
•
9th - 12th Grade
13 questions
Problem Solving Process

Quiz
•
9th - 12th Grade
10 questions
Understanding Algorithms with Pseudocode and Flowcharts

Interactive video
•
9th - 12th Grade
19 questions
AP CSP Unit 1 Review (code.org)

Quiz
•
10th - 12th Grade