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
LenKa [72]
3 years ago
7

Design an algorithm to find the weighted average of four test scores. The four test scores and their respective weights are give

n in the following format: testscore1 weight1 ... For example, the sample data is as follows: 75 0.20 95 0.35 85 0.15 65 0.30 The user is supposed to enter the data and press a Calculate button. The program must display the weighted average.
Computers and Technology
1 answer:
VMariaS [17]3 years ago
5 0

Answer:

data = [75, 0.2, 95, 0.35, 85, 0.15]

print (f'Average weight: {sum(data) / len(data)}')

Explanation:

This is python algorithm for finding average weight. To get average weight, you sum up all data involved and divide that amount by the number of data provided.

You might be interested in
Which program controls the windows startup sequence
mylen [45]

Of the different freeware and shareware programs available, two of the most popular are Xteq X-Start from Xteq Systems, and Startup Control Panel by Mike Lin. X-Start is a full-blown tweaking utility thats free for non-commercial use, and enables you to edit just about every element of a Windows system, including relevant startup and shutdown settings.

6 0
2 years ago
To reduce the number of used digital outputs of the microcontroller, the display board is connected to the main board through th
Luda [366]

Answer:

The program in Python is as follows:

BCD = ["0001","0010","0011","0100","0101","0110","0111"]

num = input("Decimal: ")

BCDValue = ""

valid = True

for i in range(len(num)):

   if num[i].isdigit():

       if(int(num[i])>= 0 and int(num[i])<8):

           BCDValue += BCD[i]+" "

       else:

           valid = False

           break;

   else:

       valid = False

       break;

if(valid):

   print(BCDValue)

else:

   print("Invalid")

Explanation:

This initializes the BCD corresponding value of the decimal number to a list

BCD = ["0001","0010","0011","0100","0101","0110","0111"]

This gets input for a decimal number

num = input("Decimal: ")

This initializes the required output (i.e. BCD value)  to an empty string

BCDValue = ""

This initializes valid input to True (Boolean)

valid = True

This iterates through the input string

for i in range(len(num)):

This checks if each character of the string is a number

   if num[i].isdigit():

If yes, it checks if the number ranges from 0 to 7 (inclusive)

       if(int(num[i])>= 0 and int(num[i])<8):

If yes, the corresponding BCD value is calculated

           BCDValue += BCD[i]+" "

       else:

If otherwise, then the input string is invalid and the loop is exited

<em>            valid = False</em>

<em>            break;</em>

If otherwise, then the input string is invalid and the loop is exited

<em>    else:</em>

<em>        valid = False</em>

<em>        break;</em>

If valid is True, then the BCD value is printed

<em>if(valid):</em>

<em>    print(BCDValue)</em>

If otherwise, it prints Invalid

<em>else:</em>

<em>    print("Invalid")</em>

7 0
3 years ago
Code used when creating a hyperlink to a specific part of the same page.
mars1129 [50]

Answer:

Give The Object Or Text You'd Like To Link To A Name.

Take That Name That You've Chosen, And  Then Now Insert It To An Opening HTML Anchor Link Tag.

Place That Complete Opening <a> Tag From Before The Text Or Object You Want To Link It To, Then Now Add A Closing </a> tag after.

(Hope this is correct and hope this helped. Sorry if I'm wrong and you get this wrong)

5 0
3 years ago
List three ways on how it's good to meet online and real life
nikitadnepr [17]

Answer:

Explanation:

How to meet people in real life

1. We can meet people if you go to your friend's party, is a great opportunity to meet friends from your friends.

2. We must go to events, in this case, if you like to read books, go to reading events.

3. We can use public transportation if you see someone reading your favorite book is the best opportunity.

How to meet people online

1. We can meet people in social media, but there are a lot of fake accounts, take care.

2. There are special platforms to meet people or to find love.

3. We could meet people on educational websites or apps, for example, if we want to learn Spanish, we can meet Spanish people.

3 0
3 years ago
Create a new conditional format that applies yellow fill (fourth color in the bottom row) and bold font to values that are highe
Yuki888 [10]

Excel conditional formatting is a really powerful feature when it comes to applying different formats to data that meets certain conditions. It can help you highlight the most important information in your spreadsheets and identify variances of cells' values with a quick glance.

At the same time, Conditional Formatting is often deemed as one of the most intricate and obscure Excel functions, especially by beginners. If you feel intimidated by this feature too, please don't! In fact, conditional formatting in Excel is very straightforward and easy to use, and you will make sure of this in just 5 minutes when you have finished reading this short tutorial.

5 0
4 years ago
Read 2 more answers
Other questions:
  • Your school computer library has a network that connects computers and devices within a few small rooms. what type of network do
    7·1 answer
  • As a safe driver, you cannot, __________
    13·1 answer
  • ____ devices are high-performance storage systems that are connected individually to a network to provide storage for the comput
    5·1 answer
  • What is the output of the second println statement in the main method, public class foo { int i ; static int s ; public sttic vo
    15·1 answer
  • Which tool can be used to code basic HTML?<br><br> Text editor<br> JavaScript<br> CSS<br> HTML
    13·2 answers
  • Help please im not sure what this means T^T
    12·2 answers
  • Ano ang dalawang paraan sa paggawa ng abono?​
    6·1 answer
  • What three best practices can help defend against social engineering attacks?
    13·1 answer
  • Identify and explain five areas where computers are used to process <br> data
    12·1 answer
  • Copy the formula in cell M7 to the range M8:M15, and edit the copied formulas to return the value from the column indicated by t
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!