Which of the following is not a data type from Python? Bool, NoneType, Tuple, Array

Lecture 2 Flashcard

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

13 questions
Show all answers
1.
FLASHCARD QUESTION
Front
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 Quizizz
9 questions
TSSR - S04 - Bash

Flashcard
•
University
12 questions
Code.org Unit 6 Assessment Day

Flashcard
•
9th - 12th Grade
14 questions
Binomial Distribution - Math 4

Flashcard
•
12th Grade
6 questions
- et ending sounds

Flashcard
•
KG
10 questions
Traversal Practice code.org unit 6

Flashcard
•
12th Grade
15 questions
Work

Flashcard
•
12th Grade
8 questions
AP CSP 12-2 U4L1 Variable

Flashcard
•
9th - 12th Grade
15 questions
Binomial Probability

Flashcard
•
12th Grade
Popular Resources on Quizizz
15 questions
Character Analysis

Quiz
•
4th Grade
17 questions
Chapter 12 - Doing the Right Thing

Quiz
•
9th - 12th Grade
10 questions
American Flag

Quiz
•
1st - 2nd Grade
20 questions
Reading Comprehension

Quiz
•
5th Grade
30 questions
Linear Inequalities

Quiz
•
9th - 12th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
18 questions
Full S.T.E.A.M. Ahead Summer Academy Pre-Test 24-25

Quiz
•
5th Grade
14 questions
Misplaced and Dangling Modifiers

Quiz
•
6th - 8th Grade
Discover more resources for Computers
17 questions
Chapter 12 - Doing the Right Thing

Quiz
•
9th - 12th Grade
30 questions
Linear Inequalities

Quiz
•
9th - 12th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
20 questions
Taxes

Quiz
•
9th - 12th Grade
17 questions
Parts of Speech

Quiz
•
7th - 12th Grade
20 questions
Chapter 3 - Making a Good Impression

Quiz
•
9th - 12th Grade
20 questions
Inequalities Graphing

Quiz
•
9th - 12th Grade
10 questions
Identifying equations

Quiz
•
KG - University