Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This question assesses Block 2 Part 4 . Parts a and b of this question involve creating drawings or descriptions. You can make your drawings

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:
>>> PUE =1.12
>>> id(PUE)
4305069808
>>> type(PUE)
>>> PUE
1.12
Draw (or describe) the object and its label that the Python interpreter creates in response to the assignment PUE =1.12 in the interactive shell above. Your drawing or description should include a Float 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:
transport =['bus', 'train', 'car']
transport[2]= 'bicycle'
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.
(4 marks)
c.This part provides you with an opportunity to demonstrate your understanding of the problem-solving approach taught in TM112 and Python functions. Decomposition and algorithms are covered in Block 1 Parts 2 and 4 and Block 2 Part 2. Further examples can be found in Block 2 Part 4. How to define your own functions is introduced in Block 2 Part 4 Section 4.1.3.
You will need an individual number in order to answer this question part. You should find your individual number as shown below before you start the question itself.

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 Security

Authors: Alfred Basta, Melissa Zgola

1st Edition

1435453905, 978-1435453906

More Books

Students also viewed these Databases questions