Question: The code below does not do what the programmer expects. What is wrong with their code? How would they fix it ? 1 listOfInts =

The code below does not do what the programmer expects. What is wrong with their code?
How would they fix it?
1 listOfInts =[1,2,3,4] # Create list with numbers 1-4
2 listOfInts[1]=3//2 # Update the 1st number of list to be 1.5
3 listOfInts[4]=1**2 # Update the 4th number of list to be 2
4 print(listOfInts) # Print the list

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!