Question: Predict the output 1. (2 points) Consider the code: data= [] for i in range (0, 5): data.append (i) for i in range(2, 10): data.
Predict the output 1. (2 points) Consider the code: data= [] for i in range (0, 5): data.append (i) for i in range(2, 10): data. append (i) for i in range (10, 0, -1): data. append (i) setData- set (data) converts set back to list data -list (setData) print (sorted(data)) What is the output? 2. (2 points) Consider the code: print ("Give me three numbers to add") firstNumber input("First number?> " secondNumber input ( "Second number?> ") thirdNumber - input ("Third number?>" total firstNumber + secondNumberthirdNumber print( The sus of your muabors io torat Corax The user provides the inputs: 1,2 and 3. What is the ou 3. (2 points) Consider the code
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
