Pseudocode as emphasised in the case study of module 5 it


Question: You are required to design and implement a "Number Test" program. The program will ask the user to enter a number and then respond stating if the number is prime (or not), is even or odd and is positive, negative or zero. Then the program will ask the user to enter a number that meets one of the criteria (randomly determined) and tell them if it is correct or not. Then the program will ask if they wish to try again and again it will again ask for a number and repeat. If they do not try again it will exit. Of course you will need to make sure all inputs are correct and the program must not crash. Use functions where appropriate and the code should be logical, readable and correct to all techniques we have covered in the unit.

The entirety of this program can be implemented in under 125 lines of code (although implementing CSP5110 requirements or optional additions may result in a program longer than this)

Background Information

This assignment tests your understanding of and ability to apply the programming concepts we have covered in the unit so far, including the usage of variables, input/output, data types, selection,iteration, functions and data structures.

Pseudocode: As emphasised in the case study of Module 5, it is important to take the time to properly design a solution before starting to write code. Hence, this assignment requires you to write and submit pseudocode of your program design as well as the code for the program. Furthermore, while your tutors are happy to provide help and feedback on your assignment work throughout the semester, they will expect you to be able to show your pseudocode and explain the design of your code. Write a separate section of pseudocode for each function in your program.

Assignment Requirements: You are required to design and implement a "Number Test" program. The program will ask the user to enter a number and then respond stating if the number is prime (or not), is even or odd and is positive, negative or zero. Then the program will ask the user to enter a number that meets one of the criteria (randomly determined) and tell them if it is correct or not. Then the program will ask if they wish to try again and again it will again ask for a number and repeat. If they do not try again it will exit. Of course you will need to make sure all inputs are correct and the program must not crash. Use functions where appropriate and the code should be logical, readable and correct to all techniques we have covered in the unit.

The entirety of this program can be implemented in under 125 lines of code (although implementing CSP5110 requirements or optional additions may result in a program longer than this) - Ask your tutor for advice if you feel your program is unusually long or inefficient.

Program Output Example: To help illustrate the program, here is a screenshot of the program being run:

Please enter a number 2

The number 2 is:

prime

even

positive

Please enter a number that is not prime 4

Correct 4 is not prime

Do you wish to try again (y/n)? y

Please enter a number 9

The number 9 is:

not prime

odd

positive

Please enter a number that is positive -3

Incorrect -3 is not positive

Do you wish to try again (y/n)? n

Goodbye

Submission of Deliverables: Once your assignment is complete, submit both your pseudocode (PDF or DOC format - no .pages files) and source code (".py" file) to the appropriate location on moodle. You will need to create a ZIP file (NOT RAR, ARJ or other archive) and submit the one file. An assignment cover sheet is not required, but be sure to include your name and student number at the top of both files.

Referencing, Plagiarism and Collusion: The entirety of your assignment must be your own work (unless otherwise referenced) and produced for the current instance of the unit. Any use of unreferenced content you did not create constitutes plagiarism, and is deemed an act of academic misconduct. All assignments will be submitted to plagiarism checking software which includes previous copies of the assignment. Remember that this is an individual assignment. Never give anyone any part of your assignment - even after the due date or after results have been released. Do not work together with other students on individual assignments - helping someone by explaining errors in their code/logic or directing them to the relevant resources is appropriate, but doing it for them or showing them how you did it is not. An unacceptable level of cooperation between students on an assignment is collusion, and is deemed an act of academic misconduct. If you are uncertain about plagiarism, collusion or referencing, simply email your tutor, lecturer or unit coordinator and ask.

Solution Preview :

Prepared by a verified Expert
Finance Basics: Pseudocode as emphasised in the case study of module 5 it
Reference No:- TGS02376540

Now Priced at $15 (50% Discount)

Recommended (98%)

Rated (4.3/5)