What is
var = 29 * 24 - 39 / 23 + 94
Week 3 Tutorial Quiz
Quiz
•
Computers
•
University
•
Hard
Wongsathorn Tonkultorn
Used 1+ times
FREE Resource
8 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
20 sec • 10 pts
What is
var = 29 * 24 - 39 / 23 + 94
Statement
Expression
Neither
Both
Answer explanation
A statement is considered an expression
2.
MULTIPLE CHOICE QUESTION
20 sec • 10 pts
What is the output from the call strange(3,100)?
3
4
5
Error!
None of the above
Answer explanation
The function stops at the first return so the second and third is unreachable
3.
MULTIPLE CHOICE QUESTION
30 sec • 10 pts
What is the output from the call f(1,1)?
4
6
8
Error!
None of the answers
Answer explanation
g(a, b) returns None which cannot be added together
4.
MULTIPLE CHOICE QUESTION
30 sec • 10 pts
What is the output from the call twice(twice(twice(2)))?
8
16
twice(2) + twice(2)
Error!
None of the answers
Answer explanation
The output of one twice() becomes the input of the other twice()
5.
MULTIPLE CHOICE QUESTION
30 sec • 10 pts
What will be printed out from executing f(5) and g(5) ?
f(5) prints 'Here'
g(5) prints nothing
f(5) prints nothing
g(5) prints 'There'
f(5) prints 'Here'
g(5) prints 'There'
f(5) prints 'There'
g(5) prints nothing
None of the answers
Answer explanation
For g(5), since 5 < 10, the else is not reached. And since 5 < 4 is false, nothing is printed!
6.
MULTIPLE CHOICE QUESTION
30 sec • 10 pts
What printed out from f(2), f(5), f(15)?
'There', 'Where', 'Here'
'Here', 'There', 'Where'
'Here', 'There', 'There'
'Here', 'Where', 'There'
'There', 'Where', 'Where'
7.
MULTIPLE CHOICE QUESTION
30 sec • 10 pts
What printed out from executing g(2)?
'Here'
'There'
'Where'
'Here' and 'There'
'Here' and 'Where'
8.
MULTIPLE CHOICE QUESTION
30 sec • 10 pts
What printed out when calling pain()?
True
'True'
False
'False'
'neither True nor False'
12 questions
MS Core Java Quiz-2 2023
Quiz
•
University
10 questions
Amazon Aptitude Quiz-SK-1
Quiz
•
University
12 questions
Pengantar Teknologi Informasi 5
Quiz
•
University
10 questions
CPP Quiz 5
Quiz
•
University
10 questions
Java Programming Basics
Quiz
•
University
12 questions
Java Class vocabulary
Quiz
•
9th Grade - University
10 questions
TIU Quiz-4
Quiz
•
University
9 questions
IPC144 -- Midterm Review
Quiz
•
University
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