Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Python only!! In this assignment you are to create a list of 10 random numbers 1 - 20. ##code to create a list of random

Python only!! In this assignment you are to create a list of 10 random numbers 1 - 20.

##code to create a list of random numbers

import random sample = [] for i in range(1, 20)

sample.append(random.randint(1, 10))

You are to write the code that will:

print the values in sample to the screen

find the total of the values in sample and print it to the screen

find the average of the values in sample and print it to the screen

iterate though the of the values in sample and print those that are greater than the average

iterate though the of the values in sample and print those that are less than the average

iterate though the of the values in sample and print those that are equal to the average

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

Students also viewed these Databases questions

Question

4. What will the team agreement contain?

Answered: 1 week ago