Answered step by step
Verified Expert Solution
Question
1 Approved Answer
One of the tests of your code should be for an input list representing a possible ISBN number partly based on the example given above
One of the tests of your code should be for an input list representing a possible ISBN number
partly based on the example given above and partly derived from your number. So the first
six digits in your ISBN list should be the first six digits from your PI number and the remaining
digits will be So for example, for the PI number B your ISBN list
will be:
The first part of this question will only consider the following part of the decomposition.
Check ISBN number Make a new list by leaving the items at the even indexes including unchanged
and multiplying the items at the odd indexes by
You may want to temporarily add a print statement to check the output.
a
i Describe the input data and the output data for this first task.
ii Specify one further input list you might use in testing in addition to the list you have
created using your PI number. Make sure that you state the test input, the
expected output and a brief explanation of why you selected this test.
iii. Write an algorithm based on Pattern
iv Implement your algorithm as Python code. Your code 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. Copy
your Python code, as text, into your Solution document. Name your Python file
QaOUCU.py where 'OUCU' is your OU computer username, eg abc Then
include the code file in your TMA zip file.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started