Can you help me write a Python 3.7 code for this question?
Write a program using functions and mainline logic which prompts the user to enter a number, then generates that number of random integers and stores them in a list. It should then display the following data to back to the user:
Code Snippet ::

Output :

Raw Code :
import random
def func(n):
#Generating n number of random_numbers btw 0 to 50 and
storing in random_list
random_list = random.sample(range(0,50),n)
print(random_list) #Printing the random_numbers
containing list
print(min(random_list)) #Minimum of the list
print(max(random_list)) #Maximum of the list
print(sum(random_list)) #Sum of the elements in the
list
#Average of elements in the list round to 2 decimal
points
print(round(sum(random_list)/len(random_list),2))
func(int(input("Enter a number : ")))#Taking input and invoking
function named func
Can you help me write a Python 3.7 code for this question? Write a program using...
Python Code Write a program using functions and mainline logic which prompts the user to enter a number. The number must be at least 5 and at most 20. (In other words, between 5 and 20, inclusive.) The program then generates that number of random integers and stores them in a list. The random integers should range from 0 to 100. (You can use a wider range if you want, but the lower end of the range must be at...
Implement the following problem as a self-contained python module. Write a program that continually prompts the user for positive integer values and stores them in a list. You should stop prompting when the user enters a negative integer value. When the user is done entering values, you should print the list of integers they have provided in sorted order. You should then compute the mean and standard deviation of the values in the list. Recall that the mean is just...
Extra Credit Assignment 4 Write a PYTHON program that asks the user to enter a series of numbers. You can decide how many numbers to enter or the user can. As the user enters each number, add it to a list. After all the numbers are added, determine: What is the highest number in the list What is the lowest number in the list What is the sum of all the numbers in the list No error checking is required....
Directions: Write a code for the following programming exercise in PYTHON!!!!!!! -Design a program that lets the user enter the total rainfall for each of 12 months into a list. The program should calculate and display the total rainfall for the year, the average monthly rainfall, and the months with the highest and lowest amounts. Here is what i got so far, but for some reason this code only print the Minimum and Maximum. its not printing the Average. def...
Write a python program where you create a list (you an create it in code you do not have to use input() statements) that represents the total rainfall for each of 12 months (assume that element 0 is January and element 11 is December). The program should calculate and display the: 1) total rainfall for the year; 2) the average monthly rainfall; 3) the months with the highest and lowest amounts. You need to figure out how to access each...
Python 3.7 to be used. Just a simple design a program
that depends on its own. You should also not need to import
anything. No code outside of a function!
Median List Traversal and Exception Handling Create a menu-driven program that will accept a collection of non-negative integers from the keyboard, calculate the mean and median values and display those values on the screen. Your menu should have 6 options 50% below 50% above Add a number to the list/array...
1) Translate the following equation into a Python assignment statement 2) Write Python code that prints PLUS, MINUS, O ZERO, depending on the value stored in a variable named N. 3) What is printed by: 3 - 1 while 5: while 10 Print ) Page 1 of 9 4) Write a Python while loop that reads in integers until the user enters a negative number, then prints the sum of the numbers. 1-2 of 9 4) Write a Python while...
(Python Programming)Write a Python program that prompts the user to enter a list of words and stores in a list only those words whose first letter occurs again within the word (for example, 'Baboon'). The program should display the resulting list.
python language
Problem Description: In this program we are going to explore a list or an array of integers using Python. Your program should read a set of integers from the user and store them in a list. Read numbers from the user until the user enters 0 to quit. Then store them in a list. Your program should them compute the sum of all the numbers in the list and output to the user. You will use lists and...
Please answer this python questions.Thank you! Question Two Write a program that calculates the amount of money a person would earn over a period of time if his or her salary is one penny the first day, two pennies the second day, and continues to double each day. The program should ask the user for the number of days. Display a table showing what the salary was for each day, and then show the total pay at the end...