Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question 4 (16 marks) This question assesses Block 2 Part 4. Parts a and b of this question involve creating drawings or descriptions. You can

Question 4 (16 marks)

This question assesses Block 2 Part 4.

Parts a and b of this question involve creating drawings or descriptions.

You can make your drawings whichever way is easiest or fastest for you. For instance, you could simply make your drawings using pencil and paper then scan or photograph them.

Alternatively, you can answer by providing descriptions of the drawings. In that case, keep close to the formulations used in the long figure descriptions of the examples given in Section 4.5 of Block 2 Part 4.

a.Consider the following lines entered on the Python shell:

>>> Q4_TMA02 = 'submitted'

>>> id(Q4_TMA02)

1944127298928

>>> type(Q4_TMA02)

>>> Q4_TMA02

'submitted'

Draw (or describe) the object and its label that the Python interpreter creates in response to the assignment Q4_TMA02 = 'submitted' in the interactive shell above. Your drawing or description should include a String object with a similar level of detail as Figure 4.14 in Section 4.5.1 (page 216) and a label.

Include your drawing or text description of the object and label in the solution document.

(2 marks)

b.Consider the following two assignments:

my_module = ['Part', '1', 'Block', '2', 'TMA02']

my_module[1] = '4'

Draw (or describe) the objects and labels that the Python interpreter creates in response to the first assignment.

Then draw (or describe) the objects and labels that results from carrying out the second assignment immediately after the first assignment.

Include your drawings or text descriptions in the solution document.

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

Introduction To Data Mining

Authors: Pang Ning Tan, Michael Steinbach, Vipin Kumar

1st Edition

321321367, 978-0321321367

More Books

Students also viewed these Databases questions