Java Casting & Booleans

Quiz
•
Mathematics, Computers
•
10th - 12th Grade
•
Medium
+7
Standards-aligned
Jennifer Hoagland
Used 173+ times
FREE Resource
20 questions
Show all answers
1.
MULTIPLE SELECT QUESTION
2 mins • 1 pt
Indicate whether the following lines of code are legal or illegal. If legal select the resulting value of x. If illegal select Error.
double x;
x = 2.3;
legal
illegal
2
2.3
Error
2.
MULTIPLE SELECT QUESTION
2 mins • 1 pt
Indicate whether the following lines of code are legal or illegal. If legal select the resulting value of x. If illegal select Error.
int x;
x = 2.3;
legal
illegal
2
2.3
Error
3.
MULTIPLE SELECT QUESTION
2 mins • 1 pt
Indicate whether the following lines of code are legal or illegal. If legal select the resulting value of x. If illegal select Error.
double x;
x = 7;
legal
illegal
7
7.0
Error
4.
MULTIPLE SELECT QUESTION
2 mins • 1 pt
Indicate whether the following lines of code are legal or illegal. If legal select the resulting value of x. If illegal select Error.
int x;
x = 7.0;
legal
illegal
7
7.0
Error
5.
MULTIPLE SELECT QUESTION
2 mins • 1 pt
Indicate whether the following lines of code are legal or illegal. If legal select the resulting value of x. If illegal select Error.
int x;
x = 3/4;
legal
illegal
0
0.75
Error
Tags
CCSS.7.NS.A.2
CCSS.7.NS.A.3
6.
MULTIPLE SELECT QUESTION
2 mins • 1 pt
Indicate whether the following lines of code are legal or illegal. If legal select the resulting value of x. If illegal select Error.
double x;
x = 3/4;
legal
illegal
0.0
0.75
Error
7.
MULTIPLE SELECT QUESTION
2 mins • 1 pt
Indicate whether the following lines of code are legal or illegal. If legal select the resulting value of x. If illegal select Error.
double x;
x = 3.0/4;
legal
illegal
0.0
0.75
Error
Tags
CCSS.7.EE.B.4
CCSS.7.NS.A.2
CCSS.7.NS.A.3
Create a free account and access millions of resources
Similar Resources on Wayground
15 questions
Grade 12-Python selection&iteration

Quiz
•
11th - 12th Grade
15 questions
Boolean expressions

Quiz
•
5th - 12th Grade
20 questions
CSP Unit 1 Review

Quiz
•
9th - 12th Grade
16 questions
Arithmetic Types Declare Initialize Relation Logical Ops

Quiz
•
9th Grade - University
15 questions
Order of Operations

Quiz
•
9th - 10th Grade
18 questions
Foundations of Programming

Quiz
•
9th - 10th Grade
20 questions
Python Functions and Error Handling

Quiz
•
10th Grade - University
15 questions
J277 Networks and Protocols

Quiz
•
8th - 10th Grade
Popular Resources on Wayground
15 questions
Hersheys' Travels Quiz (AM)

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

Quiz
•
6th - 8th Grade
30 questions
Lufkin Road Middle School Student Handbook & Policies Assessment

Quiz
•
7th Grade
20 questions
Multiplication Facts

Quiz
•
3rd Grade
17 questions
MIXED Factoring Review

Quiz
•
KG - University
10 questions
Laws of Exponents

Quiz
•
9th Grade
10 questions
Characterization

Quiz
•
3rd - 7th Grade
10 questions
Multiply Fractions

Quiz
•
6th Grade