1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
gizmo_the_mogwai [7]
3 years ago
9

Write a program that takes a positive integer argument N, and prints out the average, minimum, and maximum (in that order) of N

uniform random numbers that it generates. Note that all three statistics should be over the same sequence of N random numbers python
Computers and Technology
1 answer:
Flura [38]3 years ago
7 0

Answer:

from random import seed, choices

from statistics import mean

number = int(input("Enter integer number: "))

if number > 0:

   try:

       data = range(number+1)

       # to generate a pseudo-random number list.

       seed(10)

       # you can also use: num_list = [random.randint(0, number+1) for i in data]

       num_list = choices(data, k=len(data))

       print(num_list)

       mean_val = round(mean(num_list), 2)

       min_val = min(num_list)

       max_val = max(num_list)

   except ValueError:

       print("Must be an integer value.")

print('Avg number: {}\nMax number: {}\nMin number: {}'.format(mean_val, max_val, min_val))

Explanation:

To generate random items in a list of integers, the random choices method is used and a sequence is passed as an argument. The average, maximum, and minimum number of the list is calculated and displayed.

You might be interested in
Naynar kis dhrm se sambandhit hai​
Inessa05 [86]

Answer:

Islam dharm se sabandhit

5 0
3 years ago
Read 2 more answers
Nathan wants to use the Push transition from left to right in his presentation. After he selects the Push transition, what shoul
Vladimir [108]

After he selects the Push transition, He should select from Left option from the Effect Options drop-down menu.

<h3>What is push transition in PowerPoint?</h3>

The Push Transition Effect is known to be a function in a PowerPoint that helps to pushes one slide to show the other.

Note that when this is  applied to any presentation, it moves the current slide upwards to reveal the next slide and so on. A person can add use this kind of effect to present a scrolling effect to one's PowerPoint work.

Learn more about presentation from

brainly.com/question/24653274

8 0
2 years ago
Read 2 more answers
Well I am having trouble and I feel really bad because I helped RandomGuy1 who rubs it in my face that I gave him the wrong answ
yawa3891 [41]
Hey dude don't leave tell a mod bout it they'll fix everything up for you.
8 0
4 years ago
Pls help I will give points
Fed [463]

Answer:

phone !!

Explanation:

since it's a mobile app, that would apply to a handheld device !!

i hope this helps !!

3 0
3 years ago
Read 2 more answers
: Describe the type of gameplay seen during early video games (ex. Spacewar!, Pong).
Alexeev081 [22]

Answer:

Computer scientists began building rudimentary games and simulations on mainframe computers in the 1950s and 1960s, with MIT's Spacewar! in 1962 being one of the first such games to be played with a video display. The first consumer-ready video game hardware arrived in the early 1970s, with the Magnavox Odyssey, the first home video game system, and the first arcade video games from Atari, Computer Space and Pong, the latter of which was later transformed into a home console version. Pong's success in arcades and at home prompted numerous firms to create clones of the game, resulting in a market contraction in 1978 owing to oversaturation and a lack of innovation.

8 0
3 years ago
Other questions:
  • How to write a program that prompts the user to input two POSITIVE numbers — a dividend (numerator) and a divisor (denominator).
    13·1 answer
  • Users can make notes or highlight areas of a website and then use the ________ feature of Microsoft Edge to send the highlighted
    13·1 answer
  • (Please answer! Correct answer gets brainliest!)
    5·2 answers
  • Write a for loop that computes the following sum: 5+10+15+20+...+485+490+495+500. The sum should be placed in a variable sum tha
    7·1 answer
  • Write a Java class called BankAccount (Parts of the code is given below), which has two private fields: name (String) and balanc
    9·1 answer
  • Which one of the following word processing features saves you the most time when keying a document?
    15·1 answer
  • What is the value of |-10|
    6·1 answer
  • Write at least and explain four types of escape sequences and create an example in an IDE which consist of the mentioned escape
    7·1 answer
  • Is there such thing as free will
    12·2 answers
  • A multinational organization that offers web-based services has datacenters that are located only in the United State; however,
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!