LAB ASSIGNMENT IMPORTANT: you should complete the PDP thinking process for each program. • 1) random_num_list.py make a copy of the mipo_ex.py file from Chapter 3*. Rename and use it to create the new program. In inputs() set up an empty list, and ask the user how many numbers he/she wants the program to pick for the list. Set up a loop that runs the user- defined number of times. In the loop, the program will pick a random integer, and add each one to the list. Finish by sorting and returning the list. • In processing(), take in the number list as a parameter, and use Python list functions to find & return the total, minimum and maximum of the number list. In outputs(), take in all of the variables that the program has produced, as parameters. Then print 4 ways, showing options to display list info (see slide 13-15 & output sample) *Features in place Functions: main, inputs, processing, outputs & get_pos_int, with exception handling & restart in main(). Also includes comments - """docstring""" at top and # short throughout. Welcome to our random number game. How many integers should the computer pick for your list? Please enter a whole number: five You can only enter a number 1 or higher: 5 Here is your list of 5 integers-randomly selected & sorted: [0, 2, 3, 4, 9] Here is your list - printed w/shortcut method: 0, 2, 3, 4, 9 Here is your list - printed via a loop, with total: 0+2+3+4 + 9 = 18 Your list minimum was 0 and maximum was 9 this time. Would you like to pick again? Enter y or n: | The user decides how many numbers will be picked for the list. HINT: PPT ch. 3 has code to pick random numbers. 2

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
100%
LAB ASSIGNMENT
IMPORTANT: you should complete the PDP thinking process for each program.
.
1) random_num_list.py make a copy of the
mipo_ex.py file from Chapter 3*. Rename and use
it to create the new program.
In inputs() set up an empty list, and ask the user
how many numbers he/she wants the program to
pick for the list. Set up a loop that runs the user-
defined number of times. In the loop, the program
will pick a random integer, and add each one to
the list. Finish by sorting and returning the list.
In processing(), take in the number list as a
parameter, and use Python list functions to find &
return the total, minimum and maximum of the
number list.
In outputs(), take in all of the variables that the
program has produced, as parameters. Then print
4 ways, showing options to display list info (see
slide 13-15 & output sample)
*Features in place Functions: main, inputs, processing, outputs &
get_pos_int, with exception handling & restart in main(). Also includes
comments - """docstring""" at top and # short throughout.
Welcome to our random number game.
How many integers should the computer pick for your list?
Please enter a whole number: five
You can only enter a number 1 or higher: 5
Here is your list of 5 integers - randomly selected & sorted:
[0, 2, 3, 4, 9]
Here is your list printed w/shortcut method:
0, 2, 3, 4, 9
Here is your list - printed via a loop, with total:
0 + 2+ 3+ 4+9= 18
Your list minimum was 0 and maximum was 9 this time.
Would you like to pick again? Enter y or n: |
The user decides how many
numbers will be picked for
the list.
HINT: PPT ch. 3 has code to
pick random numbers.
Transcribed Image Text:LAB ASSIGNMENT IMPORTANT: you should complete the PDP thinking process for each program. . 1) random_num_list.py make a copy of the mipo_ex.py file from Chapter 3*. Rename and use it to create the new program. In inputs() set up an empty list, and ask the user how many numbers he/she wants the program to pick for the list. Set up a loop that runs the user- defined number of times. In the loop, the program will pick a random integer, and add each one to the list. Finish by sorting and returning the list. In processing(), take in the number list as a parameter, and use Python list functions to find & return the total, minimum and maximum of the number list. In outputs(), take in all of the variables that the program has produced, as parameters. Then print 4 ways, showing options to display list info (see slide 13-15 & output sample) *Features in place Functions: main, inputs, processing, outputs & get_pos_int, with exception handling & restart in main(). Also includes comments - """docstring""" at top and # short throughout. Welcome to our random number game. How many integers should the computer pick for your list? Please enter a whole number: five You can only enter a number 1 or higher: 5 Here is your list of 5 integers - randomly selected & sorted: [0, 2, 3, 4, 9] Here is your list printed w/shortcut method: 0, 2, 3, 4, 9 Here is your list - printed via a loop, with total: 0 + 2+ 3+ 4+9= 18 Your list minimum was 0 and maximum was 9 this time. Would you like to pick again? Enter y or n: | The user decides how many numbers will be picked for the list. HINT: PPT ch. 3 has code to pick random numbers.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 2 images

Blurred answer
Knowledge Booster
Linked List Representation
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education