Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

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

The terms of sale arenbsp59nbspnetnbsp43nbspwhat is the

The terms of sale are 5/9, net 43. What is the effective annual rate of interest?  Enter your answer in percentages rounded off to two decimal points. Do not enter % in the answer box.

Matt johnson delivers newspapers and is putting away 50 at

Matt Johnson delivers newspapers and is putting away ?$50 at the end of each quarter from his paper route collections. Matt is 9 years old and will use the money when he goes to college in 9 years. What will be the value ...

Assignment -background - youre a group of investment

Assignment - BACKGROUND - You're a group of investment analysts who work for a large investment consulting firm based in Australia. There's one big institutional investor from overseas that is interested in investing in ...

Imagine there is a 100000 t-bill that matures in 130 days

Imagine there is a $100,000 T-bill that matures in 130 days. The T-bill has a discount yield of 2.102%. Ignoring fees or commissions, how much in dollars would I pay for this T-bill?

What is the present value of a 3-year annuity of 170 if the

What is the present value of a 3-year annuity of $170 if the discount rate is 5%? (Do not round intermediate calculations. Round your answer to 2 decimal places.)

How you will adjust your small business cash budget to

How you will adjust your small business cash budget to manage contingencies (such as emergencies and market shifts) as well as product and distribution shifts?

Your accounts receivable clerk m adams to whom you pay a

Your accounts receivable clerk, M Adams, to whom you pay a salary of $2,175 per month, has just purchased a new Acura. You decide to test the accuracy of the accounts receivable balance of $118,900 as shown in the ledger ...

If you pay 55 for a share of common stock that has a

If you pay $55 for a share of common stock that has a constant growth rate of 6% and it is expected to pay a dividend of $1.25 what would be your return (hint: solve for kc and be careful about the dividend - it has alre ...

Evaluate the following fund using single-index modelfund

Evaluate the following fund using single-index model: Fund 1: Alpha (a): 1.1 Beta (B): 1.9 Variance (e): 100 Market risk expected return is 8%, and an expected standard deviation =12.25% or market variance 150. Using the ...

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