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
Anika [276]
3 years ago
6

Write a Python program calculate summary statistics about a class assignment. First, prompt the user for the number scores to be

entered. Then prompt for each score, re prompting for values outside the range 0 - 100. Finally, display the minimum, maximum and average scores. There is no need to keep a list of scores, they you may do so if you wish. Use good, meaningful variable names.

Computers and Technology
1 answer:
In-s [12.5K]3 years ago
3 0

Answer:

see explaination

Explanation:

Code:

count = 0 num_of_sub = int(input("Enter a number of subjects : ")) marks_of_subjects = [] for i in range(num_of_sub): count = count + 1 while True: marks = int(input("Enter the marks for subject {} : ".format(count))) if marks < 0 or marks > 100: print("Marks are out of range: Try again") else: marks_of_subjects.append(marks) break Total = sum(marks_of_subjects) Min_marks = min(marks_of_subjects) Max_marks = max(marks_of_subjects) Average_marks = sum(marks_of_subjects)/len(marks_of_subjects) print("Total Marks in the exams are {} Marks".format(Total)) print("Minimum Score in the exam is {} Marks".format(Min_marks)) print("Maximum Score in the exam is {} Marks".format(Max_marks)) print("Average Score in the exam is {:.2f} Marks".format(Average_marks))

see attachment for the screenshot and output

You might be interested in
Being aware of and understanding why potential buyers on a web site do not complete their purchases requires the expertise of __
TiliK225 [7]
<span>a web analyst and usability expert</span>
8 0
3 years ago
Read 2 more answers
. Write a recursive function names factorial to compute the factorial of the parameter. Also write the main function, where you
r-ruslan [8.4K]

Answer:

Following are the code in c language

#include <stdio.h> // header file

long int factorial(int n); // declaration of factorial function

int main() // main function

{

   int n; // variable declaration

   printf("Enter a positive integer: ");

   scanf("%d", &n); // input number

   while(n<0) // checking the condition if number is negative

{

    printf("please enter a positive number:");

    scanf("%d", &n);

}

   printf("Factorial of %d = %ld", n, factorial(n)); // calling  factorial function

   return 0;

}

long int factorial(int n1) // recursive definition of factorial

{

   if (n1 >= 1)

       return n1*factorial(n1-1);

   else

       return 1;

}

Explanation:

In this program, it ask for a positive number input. if the value enter by user is negative then it again ask for positive input i.e positive number. Then it calls the recursive function of factorial. the recursive function factorial calculate the factorial recursively. suppose user input 4 then it goes to the if  part of program i.e return n*factorial(n-1); that means return 4*factorial(3) again recursive function call itself .this process repeated until it meets the base condition.  when a base condition meets, it return factorial of the given number.

output

Enter a positive integer: 5

factorial of 5=120

Enter a positive integer: -8

please enter a positive number:4

factorial of 4=24

4 0
3 years ago
Hard drive access time is measured in
SIZIF [17.4K]

Answer: D) milliseconds

Explanation:

Hard drive access time are measured in milliseconds as, for the personal computer the hard drive access time is about 9 to 15 milliseconds and it basically includes the time taken for the read and write for locate the parts on the disk. As, this is the average time as it depends upon how far the head from desired.

5 0
3 years ago
When making any change to the database structure, we may need to check for effects of the change on ________.?
IrinaVladis [17]
Data, foreign keys, constraints & triggers .
7 0
4 years ago
If you were an online community director, you might use both chat and e-mail in your community. What are some similarities and d
stealth61 [152]

Emails are formal

Online chats are private and friendly

Emails are used for business

Online chats are for friends

5 0
3 years ago
Other questions:
  • When used as parameters, _________ variables allow a function to access the parameter’s
    10·1 answer
  • How many bits do you need to count up to 30 help please
    14·1 answer
  • As part of the interview process should you compose a thank-you note for the prospective employer and/or interview committee. In
    6·1 answer
  • Can somebody tell me when is ps5 releasing???​
    15·2 answers
  • Sarah has entered data about football players from team A and team B in a worksheet. She enters names of players from team A wit
    9·2 answers
  • import java.util.Scanner; public class ArraySum { public static void main(String[] args) { Scanner scnr = new Scanner(System.in)
    9·1 answer
  • 21
    5·1 answer
  • What is the minimum number of public IP addresses needed to expose a service running on 10,000 IoT devices having private IP add
    9·1 answer
  • Which feature helps an edit-test-bug cycle work faster in the python programming language
    15·2 answers
  • Why can i go to discord if my school blocks it-
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!