Question
in python please
I want to create aprogram thats going to ask the user for test Scones saperated by spaces, then I want to print out the lowe
0 0
Add a comment Improve this question Transcribed image text
Answer #1

Here is the answer..

CODE:

l = list(map(int,input("Enter test scores : ").split(" ")))   #read input numbers seperated by space

print("By DEFAULT method")
print("your average is : ",sum(l)/len(l))
print("Your lowest score was",min(l)," Your highest was",max(l))  


print("THROUGH OWN CODE")
s=0
small = 99999
large = -1
for i in l:
   if(small > i):
       small = i
   elif(large < i):
       large = i
   s +=i


print("your average is : ",s/len(l))
print("Your lowest score was",small," Your highest was",large)

OUTPUT:

E C:\Users\sai Desktop\test.py - Sublime Text (UNREGISTERED) Eile Edit Selection Find View Goto Tools Project Preferences Hel

If you have any doubts please COMMENT..

If you understand the answer please give THUMBS UP....

Add a comment
Know the answer?
Add Answer to:
in python please I want to create aprogram that's going to ask the user for test...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • USING PYTHON Allow a user to input a comma-separated series of integers or floats. Create a...

    USING PYTHON Allow a user to input a comma-separated series of integers or floats. Create a tuple sorted from lowest to highest value out of the input, then print it back to the user.

  • Please help with PYTHON exercise 1 below: Write a program Sores.py to process a student's homework...

    Please help with PYTHON exercise 1 below: Write a program Sores.py to process a student's homework scores. Ask user to enter the homework scores for a student and save the scores in a list. Loop through the list to find the total score and the lowest score. (Do not use built-in function, sum and min. You need to write a loop to process the scores). Calculate the raw average score and modified average score (after dropping the lowest score). Print...

  • PYTHON Fractal Drawing We will draw a recursively defined picture in this program. Create a function...

    PYTHON Fractal Drawing We will draw a recursively defined picture in this program. Create a function def fractal(length, spaces). This function will print out a certain number of stars * and spaces. If length is 1 print out the number of spaces given followed by 1 star. If the length is greater than one do the following: Print the fractal pattern with half the length and the same number of spaces. Print the number of spaces given followed by length...

  • Write a Python program that asks the user to type in their three quiz scores (scores...

    Write a Python program that asks the user to type in their three quiz scores (scores between 0 and 100) and displays two averages. The program should be written so one function gets the user to input a score, another function takes the three scores and returns the average of them. And another function takes the three scores and averages the two highest scores (in other words, drops the lowest). Each of these functions should do the computation and return...

  • Using Python 3, is there a way I could find the second_highest value of a user's...

    Using Python 3, is there a way I could find the second_highest value of a user's random input using a while-loop? For example, if I use random input numbers such as: 100,95,92,87,83,80,75,50,40 etc. I want it to compute the 2nd highest along with my highest and lowest score. Is there any if, else, elif, etc statement that I could add to my while statement or in my while-loop to make this happen? The output would be something like highest =...

  • CSC888 has 4 people. Each person needs to take 3 tests. Create a 4-by-3 two-dimensional array...

    CSC888 has 4 people. Each person needs to take 3 tests. Create a 4-by-3 two-dimensional array to store the test scores. Ask the user to enter test scores one at a time to populate this array. Once the whole array is filled, do the following two things. (1) For each student, display her test scores and the average of the three tests. (2) For each test, display student scores and the average of the four students. The following shows a...

  • This program will ask the user to enter a number of players, then ask the user...

    This program will ask the user to enter a number of players, then ask the user for each player's name and score. Once all of the players have been entered, the program will display a bar chart with each of their scores scaled as a percentage of the maximum score entered. See below for details on exactly how this should work - an example transcript of how the program should work is shown below (remember that values entered by the...

  • using java Program: Please read the complete prompt before going into coding. Write a program that...

    using java Program: Please read the complete prompt before going into coding. Write a program that handles the gradebook for the instructor. You must use a 2D array when storing the gradebook. The student ID as well as all grades should be of type int. To make the test process easy, generate the grade with random numbers. For this purpose, create a method that asks the user to enter how many students there are in the classroom. Then, in each...

  • Help needed related python ! Thanx :) #First let's ask the user for one of their...

    Help needed related python ! Thanx :) #First let's ask the user for one of their favorite book. # Now let's use concatenation to ask who wrote this book. # Create an empty dictionary to hold the favorite books and authors. # Use a for loop to prompt the user to enter 5 of their favorite books. # A general structure is given below. for book in favorite_book range(5): print (book) favorite_book = input("What is one of your favorite books?...

  • I keep getting an Error after I ask the user for test scores. What is missing?...

    I keep getting an Error after I ask the user for test scores. What is missing? package testscores; import java.util.Scanner; public class TestScores { /** * @param args the command line arguments */ private double[] scores;    public TestScores(double[] score) throws IllegalArgumentException { scores = new double[scores.length]; for (int i = 0; i < scores.length; i++) { if (score[i] < 0 || score[i] > 100){ throw new IllegalArgumentException(); } scores[i]=score[i];    }    } public double getAverage() { int sum=0;...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT