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
gulaghasi [49]
3 years ago
5

If you have a list consisting of just numbers, then you can add all of the values in the list using the sum() function. If your

list consists of some numbers and some values of other types (e.g., lists, strings, sets), the sum() function will fail. In this question, we're asking you to write a function that will sum all of the numbers in a list, ignoring the non-numbers. The function below takes one parameter: a list of values (value_list) of various types. The recommended approach for this: (1) create a variable to hold the current sum and initialize it to zero, (2) use a for loop to process each element of the list, (3) test each element to see if it is an integer or a float, and, if so, add its value to the current sum, (4) return the sum at the end.
Computers and Technology
1 answer:
Arte-miy333 [17]3 years ago
8 0

Answer:

def sum_numbers(value_list):

   total = 0

   for n in value_list:

       if type(n) == int or type(n) == float:

           total += n

   return total

Explanation:

Create a function called sum_numbers that takes one parameter, value_list

Initialize the total as 0

Create a for loop that iterates through the value_list

Inside the loop, check the type of the elements. If they are either int or float, add them to total.

When the loop is done, return the total

You might be interested in
Can you help me in my work
Ilia_Sergeevich [38]

Answer:

Step 1: harvest. First, you need to select the leaves for harvest. ...

Step 2: steaming. The next step is to heat the leaves by steaming them. ...

Step 3: shaping. ...

Step 4: oxidation. ...

Step 5: drying. ...

Step 6: enjoy your cup of home grown tea. ...

Step 7: storing leftover tea leaves.

5 0
2 years ago
Brenda's meeting with the web developer of her retail website concerning the integration of conversion tracking using Google Ads
RideAnS [48]

The web developer needs to have Brenda's Auto-tagging turned on in all of her Google Ads.

Explanation:

Auto-tagging features when turned on are able to track conversions on your website. Auto–tagging when combined with conversion tracking using Google Ads helps you see how effective your ad clicks are from potential customers. If Brenda’s auto-tagging is enabled, a Google Click Identifier will be registered and stored in what developers call Google Analytics. Brenda will then be able to go to Google Analytics and see customer clicks for website’s purchases, downloads, and more. By default, auto-tagging is turned. To turn it on, the web developer needs to

Sign into Brenda's Google ad account

Click settings in the left pane and select account settings

The web developer would then be able to enable auto-tagging and save the settings.

Learn more about Google Analytics and its connection to conversion tracking

brainly.com/question/13234037

brainly.com/question/14280673

#LearnWithBrainly

4 0
4 years ago
Which of the following Wi-Fi chalking method refers to drawing symbols in public places to advertise open Wi-Fi networks?
dezoksy [38]

Answer War Chalking

Explanation: War chalking is the technique for presenting the WiFi network publicly. This signifies about the WiFi is present but not describes the manner of it , that is whether it is open connection or closed connection.

It can be used by the people in general as well as hackers . Hackers usually tend to attack and hack its security that is present.Hackers then use the WiFi network  is then used for their own work after being hacked.

3 0
3 years ago
Read 2 more answers
Which of the following is an example of constructive criticism for a friend who speaks too softly?
Dmitry [639]
C is correct..

Please vote my answer branliest! Thanks.
8 0
3 years ago
Read 2 more answers
Create a cell reference in a format by typing in the cell name or
Neko [114]

Answer:

D. Create a cell reference in a formula by typing in the cell name or clicking the cell.

Further Explanation:

To create a cell reference in a formula the following procedure is used:

First, click on the cell where you want to add formula.

After that, in the formula bar assign the equal (=) sign.

Now, you have two options to reference one or more cells. Select a cell or range of cells that you want to reference. You can color code the cell references and borders to make it easier to work with it. Here, you can expand the cell selection or corner of the border.

Again, now define the name by typing in the cell and press F3 key to select the paste name box.

Finally, create a reference in any formula by pressing Ctrl+Shift+Enter.

6 0
3 years ago
Other questions:
  • As you are planning your informative speech on the prevalence of Internet memes in pop culture and you wonder if your audience w
    14·1 answer
  • A short-circuit evaluation is where each part of an expression is evaluated only as far as necessary to determine whether the en
    14·1 answer
  • Which trait depicts honesty?
    10·1 answer
  • We have two processors. They are named PL and PS. PL has a large number of registers, and PS has a small number of registers. Th
    7·1 answer
  • Trudy is preparing a reply to an email message. Before she could send out the message, she is called for a meeting. If Trudy has
    6·2 answers
  • I've been trying to sign up but it says that it can't complete my registration right now. How did you guys get in? And how can I
    8·1 answer
  • How to prepare and draw a corresponding flowchart to compute the sum and product of all prime numbers between 1 and 50
    7·1 answer
  • A vending machine that serves coffee pours a varying
    10·1 answer
  • Versiones del Moodle
    10·1 answer
  • Global communication and transportation technologies are an example of a(n) ____
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!