![navyaseth620](/avatars/36544.jpg)
navyaseth620
30.06.2021 •
Computers and Technology
Write a python application that allows a user to enter any number of student test scores until the user enters 999. If the score entered is less than 0 or more than 100, display an appropriate message and do not use the score. After all the scores have been entered, display the number of scores entered and the arithmetic average.
Solved
Show answers
More tips
- F Food and Cooking How to Make Polendwitsa at Home?...
- F Family and Home Parents or Environment: Who Has the Most Influence on a Child s Upbringing?...
- P Philosophy Unbelievable stories of encounters with otherworldly forces...
- L Leisure and Entertainment How to Choose the Perfect Gift for Men on February 23rd?...
- H Health and Medicine How to Treat Whooping Cough in Children?...
- H Health and Medicine Simple Ways to Lower Cholesterol in the Blood: Tips and Tricks...
- O Other How to Choose the Best Answer to Your Question on The Grand Question ?...
- L Leisure and Entertainment History of International Women s Day: When Did the Celebration of March 8th Begin?...
- S Style and Beauty Intimate Haircut: The Reasons, Popularity, and Risks...
- A Art and Culture When Will Eurovision 2011 Take Place?...
Answers on questions: Computers and Technology
- C Computers and Technology Use stacks to evaluate if a given string is in a language L. Your code will not be recursive. In your analysis, suggest a recursive algorithm and compare with your stack based...
- C Computers and Technology What will be printed to the screen when the following program is run? function start(){ println(doubleNumber(doubleNumber(10))); } function doubleNumber(x){ var doubledX =...
- C Computers and Technology WILL MARK BRAINLIEST Complete the sentences describing the internal parts of a computer. A (BLANK) consists of wires connecting the CPU and the other parts of the computer....
- M Mathematics Extraneous solutions of equations Which value for the constant c makes w 5 an extraneous solution in the following equation? ✓29 + 40 = 23 - CW Report a problem Stuck? Watch...
- E English HELP PLZ I BEG You will rewrite the story of the prodigal son in a modern day context ( todays version )...
- M Mathematics Mr Cameron places the names of his students in a hat order to randomly call on students. There are 12 girls and 10 boys in the class what is the probability that a boy will...
- M Mathematics Shown here is the graph of a function f. Suppose g(x) = −x2 + 10. Select the function that has the smaller rate of change over the interval [1, 3]. A) f B) g C) They are the...
- H History Compare and contrast the Declaration of Independence with the declaration of dependence. What is the purpose of the declaration of dependence and why might it have been necessary?...
- M Mathematics If V varies inversely as P, and V=5 when P=30, find V when P=3...
- E English 1 When the police were chasing the thief, he could jump over the wall. No errorCorrect if it is not...
Ответ:
This program is as follows
total = 0; count = 0
testscore = int(input("Score: "))
while testscore != 999:
if testscore < 0 or testscore > 100:
print("Out of range")
else:
total+=testscore
count+=1
testscore= int(input("Score: "))
print(count,"scores entered")
print("Arithmetic Average:",total/count)
Explanation:
This initializes total and count to 0
total = 0; count = 0
This gets input for score
testscore = int(input("Score: "))
The following iteration stop when 999 is entered
while testscore != 999:
This prints out of range for scores outside 0 - 100
if testscore < 0 or testscore > 100:
print("Out of range")
Otherwise
else:
The total score is calculated
total+=testscore
The number of score is calculated
count+=1
Get another input
testscore = int(input("Score: "))
The number of score is printed
print(count,"scores entered")
The average of score is printed
print("Arithmetic Average:",total/count)
Ответ:
Bayes’ Theorem provides a way that we can calculate the probability of a piece of data belonging to a given class, given our prior knowledge.
P(class|data) = (P(data|class) * P(class)) / P(data)
Where P(class|data) is the probability of class given the provided data.
Explanation:
Naive Bayes is a classification algorithm for binary and multiclass classification problems. It is called Naive Bayes or idiot Bayes because the calculations of the probabilities for each class are simplified to make their calculations tractable.This Naive Bayes tutorial is broken down into 5 parts:
Step 1: Separate By Class : Calculate the probability of data by the class they belong to, the so-called base rate. Separate our training data by class.
Step 2: Summarize Dataset : The two statistics we require from a given dataset are the mean and the standard deviation
The mean is the average value and can be calculated using :
mean = sum(x)/n * count(x)
Step 3: Summarize Data By Class : Statistics from our training dataset organized by class.
Step 4: Gaussian Probability Density Function : Probability or likelihood of observing a given real-value. One way we can do this is to assume that the values are drawn from a distribution, such as a bell curve or Gaussian distribution.
Step 5: Class Probabilities : The statistics calculated from our training data to calculate probabilities for new data. Probabilities are calculated separately for each class. This means that we first calculate the probability that a new piece of data belongs to the first class, then calculate the second class, on for all the classes.