Ask Basic Finance Expert

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.

Basic Finance, Finance

  • Category:- Basic Finance
  • Reference No.:- M92389711
  • Price:- $15

Priced at Now at $15, Verified Solution

Have any Question?


Related Questions in Basic Finance

Question utilizing the concepts learned throughout the

Question: Utilizing the concepts learned throughout the course, write a Final Paper on one of the following scenarios: • Option One: You are a consultant with 10 years experience in the health care insurance industry. A ...

Discussion your initial discussion thread is due on day 3

Discussion: Your initial discussion thread is due on Day 3 (Thursday) and you have until Day 7 (Monday) to respond to your classmates. Your grade will reflect both the quality of your initial post and the depth of your r ...

Question financial ratios analysis and comparison

Question: Financial Ratios Analysis and Comparison Paper Prior to completing this assignment, review Chapter 10 and 12 in your course text. You are a mid-level manager in a health care organization and you have been aske ...

Grant technologies needs 300000 to pay its supplier grants

Grant Technologies needs $300,000 to pay its supplier. Grant's bank is offering a 210-day simple interest loan with a quoted interest rate of 11 percent and a 20 percent compensating balance requirement. Assuming there a ...

Franks is looking at a new sausage system with an installed

Franks is looking at a new sausage system with an installed cost of $375,000. This cost will be depreciated straight-line to zero over the project's five-year life, at the end of which the sausage system can be scrapped ...

Market-value ratios garret industries has a priceearnings

(?Market-value ratios?) Garret Industries has a? price/earnings ratio of 19.46X a. If? Garret's earnings per share is ?$1.65?, what is the price per share of? Garret's stock? b. Using the price per share you found in par ...

You are planning to make annual deposits of 4440 into a

You are planning to make annual deposits of $4,440 into a retirement account that pays 9 percent interest compounded monthly. How large will your account balance be in 32 years?  (Do not round intermediate calculations a ...

One year ago you bought a put option on 125000 euros with

One year ago, you bought a put option on 125,000 euros with an expiration date of one year. You paid a premium on the put option of $.05 per unit. The exercise price was $1.36. Assume that one year ago, the spot rate of ...

Common stock versus warrant investment tom baldwin can

Common stock versus warrant investment Tom Baldwin can invest $6,300 in the common stock or the warrants of Lexington Life Insurance. The common stock is currently selling for $30 per share. Its warrants, which provide f ...

Call optionnbspcarol krebs is considering buying 100 shares

Call option  Carol Krebs is considering buying 100 shares of Sooner Products, Inc., at $62 per share. Because she has read that the firm will probably soon receive certain large orders from abroad, she expects the price ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As