AP CSA | U2_L1 Variables

Quiz
•
Computers
•
12th Grade
•
Medium
Cyber Professor - Mr. B
Used 2+ times
FREE Resource
25 questions
Show all answers
1.
MULTIPLE SELECT QUESTION
1 min • 2 pts
What are the references for three basic data types?
string
int
flt
str
float
2.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What data type should we use to hold if you have a pet?
int
double
boolean
String
3.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
What type of data is the following?: X = "195.67"
Float
String
Boolean
integer
4.
MULTIPLE CHOICE QUESTION
1 min • 2 pts
True or false:
This is a correct initialization of a variable.
boolean happy = true;
true
false
5.
MULTIPLE CHOICE QUESTION
1 min • 2 pts
True or false:
This is a correct initialization of a variable.
String favoriteDay = "Saturday";
true
false
6.
MULTIPLE CHOICE QUESTION
1 min • 4 pts
What are the final values of x and y in the following code segment?
int x = 3;
int y = ++x * 5 / 2;
x = 3, y = 10
x = 4, y =7
x = 4, y = 10
x = 3, y = 7
This code segment will not compile.
7.
MULTIPLE CHOICE QUESTION
3 mins • 3 pts
What does the following Python program print?
X = "Hello World!"
Y = "I can code "
Z = " In Python"
print( X + Y + Z)
Hello World! I can code In Python
Hello World!I can code In Python
Hello World! I can codeIn Python
Hello World!I can code In Python
Answer explanation
There is a space after the word "code" and before the word "In".
Create a free account and access millions of resources
Similar Resources on Wayground
20 questions
Python Basics (CodeHS)

Quiz
•
7th - 12th Grade
20 questions
Python Basic 1

Quiz
•
12th Grade
20 questions
Python Basics & Syntax

Quiz
•
10th - 12th Grade
20 questions
Python variables, expressions, and data types

Quiz
•
9th - 12th Grade
20 questions
Grade 7 Python Programming Quiz

Quiz
•
7th Grade - University
20 questions
Python básico

Quiz
•
9th - 12th Grade
20 questions
Basic Python

Quiz
•
10th - 12th Grade
20 questions
Python Basics Review (TSK)

Quiz
•
9th - 12th Grade
Popular Resources on Wayground
11 questions
Hallway & Bathroom Expectations

Quiz
•
6th - 8th Grade
20 questions
PBIS-HGMS

Quiz
•
6th - 8th Grade
10 questions
"LAST STOP ON MARKET STREET" Vocabulary Quiz

Quiz
•
3rd Grade
19 questions
Fractions to Decimals and Decimals to Fractions

Quiz
•
6th Grade
16 questions
Logic and Venn Diagrams

Quiz
•
12th Grade
15 questions
Compare and Order Decimals

Quiz
•
4th - 5th Grade
20 questions
Simplifying Fractions

Quiz
•
6th Grade
20 questions
Multiplication facts 1-12

Quiz
•
2nd - 3rd Grade