View the step-by-step solution to:

PROBLEM DEFINITION: Write a program that has three functions that do the following (identify parameters and returned values for each function): A...

INTRODUCTIONThe goal of this programming assignment is to enable you to practice programming using lists.PROBLEM DEFINITION:Write a program that has three functions that do the following (identify parameters and returnedvalues for each function): A main() function that calls the other two functions and then displays the norm* (see below). A fillVector() function to input as many numbers (float or double) into a list as the userwants. The program should validate input i.e. reject non-numbers. A computeNorm() function to calculate the norm of the vector. A norm of a vector is definedas the square root of the sum of the squares of vector elements:For example, given vector x = [-2 3 -1]The norm is |x| = √ ( (-2)2 + 32 + (-1)2) = 3.74* The message displayed by the main() function should be descriptive. For example:The norm of your vector is 3.74Write a statement at the bottom of the program to call the main() function.THE PYTHON PROGRAMThe program should do what is specified in the PROBLEM section above. The program shouldhave the following features:1) The first few lines of your program should be comments that state the program name, theauthor’s (your) name, date the program is released, and a brief description of the main taskperformed by the program.2) Your program should have meaningful variable names. There should be a comment beforeeach function definition and at each major function point: input, calculation, output, loop.EXTERNAL DOCUMENTATIONType a report of your solution in a Word or OpenOffice Writer document. You should structureyour document in four clear sections each with a subheading as follows:1. PROBLEM DEFINITIONThe problem definition comes here. This is a summary of the PROBLEM section above. 2. ANALYSISGive the variables that you have identified to hold data and explain the type of data for eachvariable. Give variables to store results of formulas. Also give variables to hold constants.Give formulas to convert input data to output data using variable names that you identified(do not copy the formula given in the PROBLEM DEFINITION section of this document.Rather, use your own variable names in the formula).3. DESIGNExplain the reasoning of the structure and logic of your program. Give the algorithm inpseudocode form of the step by step statements to carry out the required programming taskin English phrases. Pseudocode should be structured meaning that phrases inside if … orwhile … or for … or functions should be indented. Pseudocode should be in nicely listedphrases not English prose. Pseudocode should not be in Python.4. IMPLEMENTATIONWhat was the platform and programming environment used? Name the Operating Systemand compiler. How did you test your program? Give the data used to test the program. Didyou encounter any unusual situations when running the program (For example, whathappens when an alphabetic character is input instead of an account number)?PROGRAM RUN RECORD [see the APPENDIX at the end of this document]Run your program and save the program run session. For example, if you use IDLE you canclick on File on the menu and choose Save as … then change the Save as type to Text filesbefore typing the file name and clicking on SAVE.

CS115 INTRODUCTION TO COMPUTER PROGRAMMING Programming project #4 INTRODUCTION The goal of this programming assignment is to enable you to practice programming using lists. PROBLEM DEFINITION: Write a program that has three functions that do the following (identify parameters and returned values for each function): A main() function that calls the other two functions and then displays the norm* (see below). A fillVector() function to input as many numbers (float or double) into a list as the user wants. The program should validate input i.e. reject non-numbers. A computeNorm() function to calculate the norm of the vector. A norm of a vector is defined as the square root of the sum of the squares of vector elements: For example, given vector x = [-2 3 -1] The norm is |x| = √ ( (-2) 2 + 3 2 + (-1) 2 ) = 3.74 * The message displayed by the main() function should be descriptive. For example: The norm of your vector is 3.74 Write a statement at the bottom of the program to call the main() function. THE PYTHON PROGRAM The program should do what is specified in the PROBLEM section above. The program should have the following features: 1) The first few lines of your program should be comments that state the program name, the author’s (your) name, date the program is released, and a brief description of the main task performed by the program. 2) Your program should have meaningful variable names. There should be a comment before each function definition and at each major function point: input, calculation, output, loop. EXTERNAL DOCUMENTATION Type a report of your solution in a Word or OpenOffice Writer document. You should structure your document in four clear sections each with a subheading as follows: 1. PROBLEM DEFINITION The problem definition comes here. This is a summary of the PROBLEM section above.
Background image of page 1
2. ANALYSIS Give the variables that you have identified to hold data and explain the type of data for each variable. Give variables to store results of formulas. Also give variables to hold constants. Give formulas to convert input data to output data using variable names that you identified (do not copy the formula given in the PROBLEM DEFINITION section of this document. Rather, use your own variable names in the formula). 3. DESIGN Explain the reasoning of the structure and logic of your program. Give the algorithm in pseudocode form of the step by step statements to carry out the required programming task in English phrases. Pseudocode should be structured meaning that phrases inside if … or while … or for … or functions should be indented. Pseudocode should be in nicely listed phrases not English prose. Pseudocode should not be in Python. 4. IMPLEMENTATION What was the platform and programming environment used? Name the Operating System and compiler. How did you test your program? Give the data used to test the program. Did you encounter any unusual situations when running the program (For example, what happens when an alphabetic character is input instead of an account number)? PROGRAM RUN RECORD [see the APPENDIX at the end of this document] Run your program and save the program run session. For example, if you use IDLE you can click on File on the menu and choose Save as … then change the Save as type to Text files before typing the file name and clicking on SAVE . SUBMISSION METHOD a) Upload to Blackboard a copy of your external documentation. b) Upload to Blackboard a copy of your program (not MS Word or PDF or RTF or WPS formats but as generated by your editor saved with a .py extension). c) A text file containing the record of the program run session. You will click on the black words “Programming project 4” in the “Programming projects” area on Blackboard and then click on “Browse My Computer” then attach your external documentation document, again click “Browse My Computer” and attach the program, and again click “Browse My Computer” and attach the record of program run before finally clicking SUBMIT. GRADING This program will be graded out of 100 points distributed as follows: ITEM MAX. POINTS External documentation . . . . . . . . . . . . . . . . . . . . . 30 Style: comments, meaningful names, . . . . . . . . . . 10 indentation Program compiles error free . . . . . . . . . . . . . . . . . 30 Program works correctly . . . . . . . . . . . . . . . . . . . . 30
Background image of page 2
Show entire document
Sign up to view the entire interaction

Top Answer

i have uploaded two files. one is program file... View the full answer

documentation.docx

EXTERNAL DOCUMENTATION
1. PROBLEM DEFINITION :
The problem is to calculate the norm of a given vector using three functions that are
main(), fillvector() and computeNorm(). The program should also...

Sign up to view the full answer

Why Join Course Hero?

Course Hero has all the homework and study help you need to succeed! We’ve got course-specific notes, study guides, and practice tests along with expert tutors.

-

Educational Resources
  • -

    Study Documents

    Find the best study resources around, tagged to your specific courses. Share your own to gain free Course Hero access.

    Browse Documents
  • -

    Question & Answers

    Get one-on-one homework help from our expert tutors—available online 24/7. Ask your own questions or browse existing Q&A threads. Satisfaction guaranteed!

    Ask a Question
Ask a homework question - tutors are online