Question: USE PYTHON (JUPYTER) Question 1 - Data Types and Data Handling (16 marks) Question 1a (10 marks) Update the code below to: 1. Reduce the

USE PYTHON (JUPYTER)

USE PYTHON (JUPYTER) Question 1 - Data Types and Data Handling (16

Question 1 - Data Types and Data Handling (16 marks) Question 1a (10 marks) Update the code below to: 1. Reduce the starting number of Proton by 8 and increase BMW by 8 2. Print the total number of cars in the cars box 3. Select five cars and save them in a list, removing them from the cars box 4. Print out the list of selected cars, and the number of cars remaining in the box In [2]: import random cars = [] # Initial cars in cars box cars.extend(['Mercedes']*16) cars.extend(['Proton']*16) cars.extend(['Perodua']*8) cars.extend(['Toyota']*12) cars.extend(['BMW']*8)

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!