CS151 PROGRAMMING ASSIGNMENT 1 solution

$25.00

Original Work ?

Download Details:

  • Name: Programming-Assignment-1-Code-cixhib.zip
  • Type: zip
  • Size: 3.97 KB

Category: You will Instantly receive a download link upon Payment||Click Original Work Button for Custom work

Description

5/5 - (1 vote)

I. PURPOSE OF THE ASSIGNMENT

This assignment is aimed at:

providing you an opportunity to use mathematical expressions, input, and output in Python
giving you the opportunity to design a program
providing you with an opportunity to plan for testing your program
practice soliciting and using input from the user

II. PROBLEM

Most people who develop computer software don’t do it for themselves or for an instructor’s imaginary scenario. Most programs are written to solve a problem or answer a real need. Even though you don’t know all of Python, you will know enough to write a simple program that does a calculation that could be helpful to someone else.

Find a simple mathematical calculation that is of use to someone else (a friend, a parent, a sibling). The first step is to ask the person and get a clear idea of the need (No fair assuming your program will be helpful — you need to actually ask!). You can use email, phone, or any other app like Zoom if the person is at a distance. Your program must ask for input values for the calculation, do the calculation, and output the result.

A Project Example: Finding area and circumference of a circle given the radius.

Not allowed projects: You may not solve a problem that is solved in the textbook (including in the textbook’s video notes), or a problem you see in class, lab, or prep!

III. REQUIREMENTS ANALYSIS

The first stage in your programming assignment is the requirements analysis stage. You need to:

Find someone who needs a set of mathematical calculations done. It must require more than one mathematical operation (i.e. you can’t just add 2 numbers together).
Think about what you need to do to solve their problem. What information do you need to gather, and how do you correctly calculate what they need to calculate?
Gather the information you need to be able to solve their program.
IV. DESIGN
The second stage is to design your solution:

Make sure you understand how to solve the problem correctly. If you don’t understand the problem steps, or make incorrect assumptions about how they work, your algorithm won’t solve the problem. Do NOT assume you know how to solve it without checking.
Write out your algorithm, including input, output, and calculations.

Test your algorithm to make sure it solves the problem correctly.
Note that your algorithm should work for any set of valid input numbers. So for instance, in our example problem of finding the area and circumference of a circle given the radius, your program should work correctly for any radius. The user would input the radius, which would then be used in your calculation. We will learn how to do this in a program during Week 2!

DESIGN SUBMISSION: Your requirements analysis and design are due on Wednesday 1/26.
Submit in a file named designInitial.txt in your PA1 repository:

A description of the problem you will solve
The name of the person you are solving it for and their relation to you (parent, roommate, friend, etc)
A reference for where you looked up the calculation for the problem (could be a web link, a textbook, etc.)
The algorithm for your program including input, output, and calculations.
Submit to Moodle:

A signed or emailed statement from your user that indicates that he/she has a need for your software to solve this problem. If it was on paper, you can take a picture of it or scan it to PDF from one of the campus printers to get a digitial copy to submit it.

V. PROGRAMMING REQUIREMENTS

After your design is complete, it’s time to start programming and then testing. You should do the following steps:

Implementation: Write your program following the below requirements and based on your design after updating it based on instructor feedback.

The user must input at least one number needed for the calculation.
Output the answer to the user, using text to describe what the number is (good usability).
Be careful in your use of mathematical symbols and Math functions.

Testing: Make sure it works correctly; give it sample input, and check that the output is correct.
Create a list of input and the correct output that covers all of the different cases of your program. Follow the same organization as we learned for Lab 1. The number of test cases you need depends on your problem; think about the different ways a calculation could have been programmed incorrectly and make a test case for each. List your test cases in testcases.xlsx.

Test your program using the test case input. If it doesn’t give the expected output, find the error and fix it, then test again. Keep testing and modifying until it works.
Evaluation: Ask your “customer,” i.e. the person for whom the program was written, to evaluate your program. Does your program do what he/she wanted? If not, make adjustments to your program and ask again. If your customer is not at Loyola, you can usually use a Zoom meeting or something similar to show it to them.

VI. ASSIGNMENT REMINDERS

Follow the programming assignment requirements document on Moodle for comments, formatting, etc. Check each part off as you finish it to help you keep track of everything.

NOTE: You will get a ZERO for this assignment if you do not submit proof of having an actual client, as requested in the design and final submissions.

VII. REFLECTION
Write a short reflection about the programming assignment: How was it solving a problem for someone you know, how was it programming by yourself instead of with a partner, what did you learn, what would you do differently next time?

This should be no more than 400 words.

This MUST be saved in reflection.txt and submitted in your GitHub repository.

VIII. SUMMARY of FINAL SUBMISSION
To GitHub:
Your .py file
Your reflection of the programming assignment (reflection.txt; see part VII above)
Your final algorithm (designFinal.txt; fix any issues your instructor pointed out in your design submission).
If you are turning the project in late, please follow the directions in the PARequirements document on Moodle on how to inform your instructor.

To Moodle:
A statement from your customer that they are satisfied that your software meets their need. This statement should either be signed or a saved email that is clearly from the customer.
A list of your test cases (testcases.xlsx; i.e. input/output pairs you used to test the correctness of your program – must match the format learned for Lab 1). Create a testcases.xlsx Excel spreadsheet and upload it to Moodle.

Do NOT assume that your push to GitHub worked. Go to GitHub.com and look to see that the correct files are there. You can click on a listed file to see its contents. If you don’t push it to GitHub, your instructor can’t grade it. The timestamp on GitHub shows when you uploaded it.