Question: Python 2.7, please. Problem Statement 1) Write Python code that prompts the user to input a number (n). Then your code will list all the

Python 2.7, please.  Python 2.7, please. Problem Statement 1) Write Python code that prompts

Problem Statement 1) Write Python code that prompts the user to input a number (n). Then your code will list all the numbers (1 - n) with a comma after each number except for the last number. There should be 10 numbers per line. For extra credit write two complete versions, i. Using a for-loop structure ii. Using a while-loop structure Example: If user input was 8 or 30 your result should look as shown below. Your code is running at https://python-lect Important: use os.getenv(PORT, 808e) as theImportant: use os.getenv(PORT, 8080) as the por Your code is running at https://python-lecturesits How many numbers would you like to add? 8 1, 2, 3, 4, 5, 6, 7, 8 Sum- 36 Average 4.5 How many numbers would you like to add? 30 1,2, 3, 4, 5, 6, 7, 8, 9, 1, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30 Process exited with code: um 465 Average= 15.5 Process exited with code

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!