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
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
Related questions
Question
100%
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 2 images
Knowledge Booster
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.Recommended textbooks for you
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)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
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)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education