
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
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
9 questions
Kuis Induksi Elektromagnetik kelas 12
Flashcard
•
12th Grade
10 questions
EKONOMI MALAYSIA BAB 6 - KEMISKINAN - BIL 1
Flashcard
•
University
12 questions
Subject: school ( school )
Flashcard
•
KG - University
5 questions
Backtracking
Flashcard
•
11th Grade
10 questions
Fun with Adding Numbers
Flashcard
•
KG
10 questions
Vocabulary Flashcards
Flashcard
•
KG
11 questions
Radicación y Potenciación
Flashcard
•
12th Grade
10 questions
SEL VOLTA
Flashcard
•
12th Grade
Popular Resources on Wayground
10 questions
Honoring the Significance of Veterans Day
Interactive video
•
6th - 10th Grade
9 questions
FOREST Community of Caring
Lesson
•
1st - 5th Grade
10 questions
Exploring Veterans Day: Facts and Celebrations for Kids
Interactive video
•
6th - 10th Grade
19 questions
Veterans Day
Quiz
•
5th Grade
14 questions
General Technology Use Quiz
Quiz
•
8th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
15 questions
Circuits, Light Energy, and Forces
Quiz
•
5th Grade
19 questions
Thanksgiving Trivia
Quiz
•
6th Grade