Discuss iteration functions and data structures

Assignment Help Finance Basics
Reference no: EM131580996

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.

Reference no: EM131580996

Questions Cloud

Compute the ear for each investment choice : You have found three investment choices for a one-year deposit:10% APR compounded monthly, Compute the EAR for each investment choice
Maintain indefinitely its traditional plowback ratio : The market consensus is that Analog Electronic Corporation has ROE of 9%, has a beta of 1.25 and plans to maintain indefinitely its traditional plowback ratio
What is meant by the time value of money : ACCOUNTING & QUANTITATIVE ANALYSIS - Explain each of these methods to a non-accountant - what is meant by the TIME VALUE OF MONEY
Discuss fallacies and errors in sound reasoning : Discuss Fallacies and Errors in Sound Reasoning, There are several types of fallacies-equivocation, false authority, ad hominem, appeal to ignorance
Discuss 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.
Most important within an organization : Why is the role of a systems analyst one of the most important within an organization?
Prepare the direct materials cost and the conversion cost : Using the FIFO method, prepare the direct materials cost and the conversion cost per equivalent unit and assign Aprils costs to the departments output
Becoming a tension releaser or a harmonizer : As to other roles, have to experienced becoming a tension releaser or a harmonizer?
Leader derive new perspectives on that change : How can the "force field" analysis help a change leader derive new perspectives on that change?

Reviews

Write a Review

Finance Basics Questions & Answers

  Financial reporting and analysis

Finance is about Gunns Ltd, a company in dealing with forestry products in Australia. The company has also been listed in Australian Stock Exchange. As many companies producing forestry products, even Gunns Ltd is facing various problems. Due to the ..

  A report on financial accounting

This report is specific for a core understanding for Financial Accounting and its relevant factors.

  Describe the types of financial ratios

Describe the types of financial ratios and other financial performance measures that are used during venture's successful life cycle.

  Differences between sole proprietorship and corporation

Briefly describe the major differences between a sole proprietorship and a corporation

  Prepare a cash budget statement

Calculate the expected value of the apartment in 20 years' time. What is the mortgage loan repayment at the beginning of each month

  What are the implied interest rates

What are the implied interest rates in Europe and the U.S.?

  State pricing theory and no-arbitrage pricing theory

State pricing theory and no-arbitrage pricing theory

  Small business administration

Identify the likely stage for each venture and describe the type of financing each venture is likely to be seeking and identify potential sources for that financing.

  Effect of financial leverage

The Effect of Financial Leverage and working capital management

  Evaluate the basis for the payment to the lender

Evaluate the basis for the payment to the lender and basis for the payment to the company-counterparty.

  Importance of opps, ipps, mpfs and dmepos

Research and discuss the differences and importance of : OPPS, IPPS, MPFS and DMEPOS.

  Time value of money

Time Value of Money project

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd