Question
QUESTION 1 What sequence of values will be printed when the following instructions are executed? X = 8 if (X < 7): print(6) Y =
QUESTION 1
What sequence of values will be printed when the following instructions are executed?
X = 8 if (X < 7): print(6) Y = 6 elif (X > 4): Y = 4 Y = Y + 1 if (Y < 5): print(3) else: print(2)
6
4
2
5
2.5 points
QUESTION 2
What is the output of the following python program
X = 4 C = 0 while (X > 0): if (X % 3 == 0): C = C - 1 else: C = C + 1 X = X - 1 print(C)
1
0
2
None of the above
2.5 points
QUESTION 3
Suppose the variables X and Y in the following Bare Bones program have the values 3 and 3, respectively, when execution begins.
clear Z
while X not 0:
while Y not 0:
decr Y
incr Z
incr Z
decr X
What will be the value of Z when the program terminates?
0
1
5
6
2.5 points
QUESTION 4
Which of the following answer(s) might be obtained by means of outlier analysis?
1. Which are the flawed parts on a production line conveyor belt? 2. What items have not sold during the last two days? 3. What sales region generated the most orders over the last sales period? 4. Which shoppers in a busy shopping mall are potential shoplifters?
1 2 4
1 4
1 2
2 3 4
2.5 points
QUESTION 5
Which layer of the TCP/IP hierarchy decides the direction in which message segments are transferred across the Internet?
Application
Transport
Network
Link
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started