Write a PYTHON command line program in a file called [url removed, login to view], that prompts the user to choose from the following options: (1) EXPANDED SUM (2) REVERSE EXPANDED SUM (3) REVERSE INTEGER (4) PRODUCT TABLE (5) EXIT The program should repeat the menu options until the user enters option 5.
The following is a description of what each option should do when chosen:
For all options, the user should be asked to enter a positive integer. Do some simple error checking to make sure the integer they entered is in fact a positive integer. Simple error checking would consist of entering a negative integer. If it is not valid data, then the program should repeat and ask the user to enter their data again. Once the data is valid then…
EXPANDED SUM: Output the expanded sum of the first n positive integers as well as the actual sum. For example, if the user entered 5, then your program should output 1+2+3+4+5=15.
REVERSE EXPANDED SUM: Output the expanded sum in reverse. For example if the user entered 7, then your program should output 7+6+5+4+3+2+1=28
REVERSE INTEGER: Write the integer they entered in reverse. For example if they enter 24, then your program should output: The positive integer you entered, reversed is 42.
PRODUCT TABLE: Output an N by N square product table. For example, if the user enters 4, your program should output: A B C D 1| 1 2 3 4 2| 2 4 6 8 3| 3 6 9 12 4| 4 8 12 16 All of the above options should be implemented by writing and calling the following methods. The method signatures below are in pseudo-code. Void means that the method will not return a value. Int is short for integer, Boolean implies true or false. a. For parts (1) and (2) write the function void printSum(int n, boolean reverse) where n is the integer they entered and reverse is either true or false. If true, then the sum is printed in reverse. Write the function sum(int n) which returns the sum of the first n positive integers. printSum should call sum. b. For part (3) write the function int reverseInt(int n) which returns the number n in reverse. c. For part (4) write the function void printProductTable(int n) which prints the N x N multiplication table. FOR EXTRA CREDIT TOWARDS THIS PORTION OF THE FINAL EXAM, DO THE FOLLOWING: Error proof your program to check for all invalid data entry, including errors containing letters, non-numeric symbols, etc…
36 freelancere byder i gennemsnit $27 på dette job
Having experience of python, I can do what you want. Python is my primary programming language. Let us discuss details in chat. Relevant Skills and Experience python Proposed Milestones $30 USD - 1 day
Dear Sir. I have good experiences with python programming. I can give good result. I look forward your response Regards. Relevant Skills and Experience Python programming Proposed Milestones $23 USD - in 1 day