Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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.

image text in transcribed
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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

1 0 . What is meant by authorization practices

Answered: 1 week ago