
Praxis 5652 Computer Science Prep Mod 3 Output and Print Stateme
Authored by Brandon Milam
Computers
Professional Development

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
29 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following code segments would produce the following output:
max:
5
int max = 5
print max:
print 5
int max = 5
print “max:”
print max
int max = 5
print “max:” //AppendLineFeed
print max
int max = 5
print max:
print “5”
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Consider the following code segment.
print ( “apple” ) //line break appended
print ( “banana” )
print ( “pear ” )
What is printed as a result of executing the code segment?
apple
bananapear
applebanana
pear
apple
banana pear
apple banana
pear
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Consider the following code segment:
double rate 2.25
/* missing code */
Which of the following could replace /* missing code */ so the output is 5.0 ?
print (2 * rate + 0.5)
print (2 * (rate + 0.5))
print (2 + rate * 0.5)
It is not possible to replace the code and get an output of 5.0.
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is output when the following code segment is run?
int rate -4
int irate 2
int sum rate * irate
int irate irate + 3
print (sum * 2)
sum*2
-16
-22
22
Answer explanation
Solution: sum get the value of rate * irate at the point it is assigned. It does not change when irate gets modified
5.
MULTIPLE SELECT QUESTION
45 sec • 1 pt
. Which of the following statements would print 42 when executed? Select all that apply.
print ( 42 * 1.0)
print (“42 * 2 / 2”)
print (42)
print (“42”)
Answer explanation
a would print 42.0, b would print, as a text string, 42 * 2 / 2
c would print 42 (the integer) and d would print 42 (as a text string)
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Consider the following code segment.
print ("monkey ")
print ("giraffe ") //line break appended
print ("lion ") //line break appended
print ("cheetah ")
What is printed as a result of executing the code segment?
monkey
giraffe
lion
cheetah
monkey giraffe
lion cheetah
monkey giraffe
lion
cheetah
monkey giraffe lion cheetah
monkey
giraffe
lion cheetah
Answer explanation
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output when the following code is executed?
print (5 - 3) //line break appended
print ("5 - 3")
5 - 3
5 - 3
5 - 3
2
2
2
2
5 - 3
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
25 questions
TechTrivia-1st round
Quiz
•
Professional Development
25 questions
CompTIA Security+ Quiz
Quiz
•
Professional Development
25 questions
IoT Quiz - 1
Quiz
•
University - Professi...
25 questions
Set-Up Computer Server
Quiz
•
Professional Development
25 questions
IT support level-1 (MCQ-2)
Quiz
•
Professional Development
25 questions
STIN (EM24) - Sistemas de Información (T1)
Quiz
•
University - Professi...
25 questions
C module 1 second quiz
Quiz
•
Professional Development
25 questions
Maintaining Computer Systems and Networks
Quiz
•
Professional Development
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
29 questions
Alg. 1 Section 5.1 Coordinate Plane
Quiz
•
9th Grade
22 questions
fractions
Quiz
•
3rd Grade
11 questions
FOREST Effective communication
Lesson
•
KG
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
Discover more resources for Computers
15 questions
LOTE_SPN2 5WEEK3 Day 2 Itinerary
Quiz
•
Professional Development
20 questions
Black History Month Trivia Game #1
Quiz
•
Professional Development
20 questions
90s Cartoons
Quiz
•
Professional Development
42 questions
LOTE_SPN2 5WEEK2 Day 4 We They Actividad 3
Quiz
•
Professional Development
6 questions
Copy of G5_U6_L3_22-23
Lesson
•
KG - Professional Dev...
20 questions
Employability Skills
Quiz
•
Professional Development