Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please show me step by step in python Task 3 - Using the same list from Task 1, do the following Change the first element

please show me step by step in python
image text in transcribed
Task 3 - Using the same list from Task 1, do the following Change the first element to 1.5 - Add a new element 8.5 to the end of the list Insert the value 5.5 in between the existing elements 5 and 6 in the list Remove the existing element 10 The list is now out-of-order, so sort it! Task 4 - Create a tuple, where the first element is your name, and the second element is your student ID - Create a tuple, by using the tuple(...) function to convert the list from the previous tasks - Print out a random element of the second tuple, by using the rondom module and random.randranged function to choose a number between 0 and the length of the tuple - Write some code which will try to modify one of the tuples in some way (e.g., tries to change an existing element). This will cause the program to throw an error, and crash. When this happens, find the name of the error that occurs (something like "2???Error"). Remove the code causing the error, and just print the name of the error you found

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

Step: 3

blur-text-image

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

Database Theory And Application Bio Science And Bio Technology International Conferences DTA And BSBT 2011 Held As Part Of The Future Generation In Computer And Information Science 258

Authors: Tai-hoon Kim ,Hojjat Adeli ,Alfredo Cuzzocrea ,Tughrul Arslan ,Yanchun Zhang ,Jianhua Ma ,Kyo-il Chung ,Siti Mariyam ,Xiaofeng Song

2011th Edition

3642271561, 978-3642271564

More Books

Students also viewed these Databases questions

Question

5. Structure your speech to make it easy to listen to

Answered: 1 week ago

Question

1. Describe the goals of informative speaking

Answered: 1 week ago