
Lecture 2 Flashcard
Flashcard
•
Computers
•
12th Grade
•
Practice Problem
•
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
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
Differentiation Essentials
Flashcard
•
12th Grade
16 questions
Derivatives on Product & Quotient Rule
Flashcard
•
12th Grade
10 questions
Algebra
Flashcard
•
12th Grade
7 questions
IP адреса и маски
Flashcard
•
11th Grade
12 questions
Biologi Tingkatan 5 Bab 3
Flashcard
•
12th Grade
10 questions
Pendant mon temps libre
Flashcard
•
University
15 questions
Daily Check-in (Alg 2)
Flashcard
•
KG - 12th Grade
14 questions
Deviance
Flashcard
•
11th 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
54 questions
Analyzing Line Graphs & Tables
Quiz
•
4th 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