Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Assignment #2 - Loops and Decisions Due: Check Blackboard Course Site for Due Date For this assignment - you will write a python program with

image text in transcribed

Assignment #2 - Loops and Decisions Due: Check Blackboard Course Site for Due Date For this assignment - you will write a python program with the following functionality: Use the following tuple values: (12, 25, 37, 51, 62, 75, 88) For each number in the above tuple, generate 20 random numbers between 1 and 100. Test these 20 random numbers against each number in the tuple and keep track of the number of times that your random number is less than or equal to your tuple number 12, 25, etc). For example, test the tuple number 12 against 20 random numbers and print the results. Next, test the tuple number 25 against a new set of 20 random numbers and print those results. Repeat this for the rest of the tuple numbers. For each tuple number, print the tuple number along with the total times your random number is less than or equal to your tuple number. Your final output should look similar to the one below (shouldn't be exact since we are dealing with random numbers): 1 2 3 25 5 37 5 51 9 62 12 75 13 88 17

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Advanced Database Systems For Integration Of Media And User Environments 98

Authors: Yahiko Kambayashi, Akifumi Makinouchi, Shunsuke Uemura, Katsumi Tanaka, Yoshifumi Masunaga

1st Edition

9810234368, 978-9810234362

More Books

Students also viewed these Databases questions

Question

Identify the cause of a performance problem. page 363

Answered: 1 week ago