Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

b . In this part of the question, you will implement the final steps in the top - level decomposition given at the beginning of

b. In this part of the question, you will implement the final steps in the top-level decomposition given at the beginning of this question:
> Find the sum of the items in the transformed list
> If the remainder of the sum divided by 10 is 0, result is valid, else result is invalid[9,21,8,0,1,12,1,3,8,9,2,3,3]
The output valid will be printed.
i. Identify a pattern that could best be applied to the solution of the second task given that you should not use the sum() function. State clearly the name of the pattern and the pattern number, for example 'List generation Pattern 2.2'. A list of all the patterns can be found in the Problem solving and Python quick reference.
[Note, in addition to the pattern you have identified, you will also need to use Pattern 4.2(case analysis, two cases)].
ii. Write an algorithm based on the pattern you have identified.
iii. Implement your algorithm as Python code. This must match the steps of your algorithm and you should use comments in the code to make it clear how the two correspond. Marks will be lost if the program does not follow the algorithm. Your code should include a comment that gives your PI number. Copy your Python code for this second task as text, using an evenly spaced font such as New Courier or Consolas, into your Solution document. Name your Python file Q2b_OUCU.py,
image text in transcribed

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

DB2 11 The Database For Big Data And Analytics

Authors: Cristian Molaro, Surekha Parekh, Terry Purcell, Julian Stuhler

1st Edition

1583473858, 978-1583473856

More Books

Students also viewed these Databases questions

Question

=+ (c) Show that f is a measure on Fand agrees with a on Fo.

Answered: 1 week ago

Question

identify current issues relating to equal pay in organisations

Answered: 1 week ago