What is the output of the following code?
Sum = 0
For value in range(1,4) :
If value == 2:
Sum = sum**2
Sum += value
Print(sum)
A) 6
B) 12
C) 8
D) 16
Correct Answer:
Verified
Q30: A literal representation of a list is
Q31: A tuple is an immutable sequence of
Q32: What symbol is used to insert a
Q33: Which comparison operation returns True if variable
Q34: A dictionary object contains zero or more
Q36: Assume x is equal to 5 and
Q37: What is the output of the following
Q38: What is the name of the function
Q39: What is the output of the following
Q40: Which of the following is true about
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents