What does the following loop do? val = 0 total = 0 while (val < 10): val = val + 1 total = total + val print( total)

What Does The Following Loop Do? Val = 0 Total = 0 While (val &lt; 10): Val = Val + 1 Total = Total +

Answers

Answer 1

Answer:

print(total) => 45

Explanation:

# smells like Python...

val = 0 #initialize incrementor named 'val' at 0.

total = 0 #initilize accumulator named 'total' at 0.

while (val < 10): #look to execute while val is less than 10.

 val = val + 1 #increment val (val++) by 1

  total = total + val #increment total by val (val+=total)

# Step: val = 0

## val => 1, total => 1

# Step: val = 1

## val => 2, total => 3

# Step: val = 2

## val => 3, total => 5

# Step: val = 3

## val => 4, total => 9

# Step: val = 4

## val => 5, total => 14

# Step: val = 5

## val => 6, total => 20

# Step: val = 6

## val => 7, total => 27

# Step: val = 8

## val => 9, total => 36

# Step: val = 9

## val => 10 (END_LOOP), total =>  45

print(total) #print variable 'total'


Related Questions

MICROSOFT WORD PLZ ANSWER THIS

Answers

Answer:

font face i think

Explanation:

Which of the following was not something colonial children had to do? WILL GIVE BRANLEST ///////////////////////////////////////////////////////////////////////////////////////////////////

Have their parents permission whenever they went outside.
Never argue with their siblings.
Never eat in the presence of adults.
Bow when they approached their parents.

Answers

Answer:

i beleive it is bow when they approach their parents

The process of sending a result back to another part of the program is
known as returning the value.

Answers

Answer:

The process of sending a result back to another part of the program is known as pushing a value False In Python, functions and other resources are coded in components called modules

Explanation:

I have a computer teacher who made me lose points in an assignment and saying that the reference page should be on a separate page. But, when I rechecked my work the reference page was actually on a separate page, and she was marking points off for no reason. She says that she'll grade on "what she sees". I created a document with the link to my assignment and screenshots showing proof that I did the assignment correctly. I even circle the screenshots for her to see where the reference page is. But, she still doesn't believe me at all. What should I do?

Answers

Answer:

Have a talk with your teacher. Ask why she doesn't believe you, and if it still doesn't work, have a talk with someone that can physically help you - a principle or another teacher may be the best solution.

Discuss how file and process ownership can pose a threat to the security of a computer system.

Answers

File and Process ownership can pose a threat to the security of a computer system by making changes to the system files.

File and Process ownership refers to the sole ownership and administration-like privileges of a user to a file and process in a computer system which gives access to be able to modify some things that could adversely affect the computer system.

Conversely, when an unauthorized user makes use of this to make changes, it can lead to:

Loss of personal dataMisuse of administrator privilege Hackings

Therefore, the threat this can pose to the security of a computer system is enormous and safeguards should be put in place to ensure such lapses never occur.

Read more here:

https://brainly.com/question/17063426

A positive integer is called a perfect number if it is equal to the sum of all of its positive divisors, excluding itself. For example, 6 is the first perfect number because 6 = 3 + 2 + 1. The next is 28 = 14 + 7 + 4 + 2 + 1. There are four perfect numbers less than 10,000. Write a program to find all these four numbers.

Answers

i = 1

while i < 10001:

   total = 0

   x = 1

   while x < i:

       if i % x == 0:

           total += x

       x+=1

   if total == i:

       print(str(i)+" is a perfect number")

   i += 1

When you run this code, you'll see that 6, 28, 496, and 8128 are all perfect numbers.

Which of the following is not a natural resource

Answers

Explanation:

Hydro-electric energy is not a natural resource because people use turbines to convert the energy from moving water. Abiotic resources are those that come from non-living, non-organic material. Examples of abiotic resources include land, fresh water, air, rare-earth elements, and heavy metals including ores, such as gold, iron, copper, silver, etc.

A nonrenewable resource is a natural substance that is not replenished with the speed at which it is consumed. It is a finite resource. Fossil fuels such as oil, natural gas, and coal are examples of nonrenewable resources. ... Renewable resources are the opposite: Their supply replenishes naturally or can be sustained.

What are the default page settings for a Google Doc? *

Answers

Wym sir/ma’am (Click File > Page Setup. Change the page size to A4. Click Set as default) if that’s what you need

Which emails go to the draft folder

Answers

Answer:

Hi there, the only emails that go to the draft folder are the emails that you start to write and then you don't finish it so you can go back and finish writing it later.

Explanation:

Hope this helps!! Please consider marking brainliest! Have a good one!!

Answer:

An email that you haven't sent yet or that is unfinished.

Explanation:

You can send an email to the draft folder by just exiting the tab before you hit send which then places the email message into the drafts folder.

Who is credited with writing Google's famous page ranking search algorithm?
A) Larry Page
B) Steve Jobs
C) Mark Zuckerburg
D) Bill Gates

Answers

Larry page is the correct answer :)

Answer:

Larry Page i believe

Explanation:

what data type is -6

Answers

Answer:

Data types are different from display formats, which control how values are displayed within columns.

Explanation:

Should be an integer because it’s a whole number!

PLEASE HELP!! TIMED Select the corect answer. You try to enter your name to a cell that accepts a numeric value What error would you receive?
A. #NAME
B. #VALUE
C. #REF
D. #####
E. #DIV​

Answers

Answer:

B. #VALUE

Explanation:

Occurs if one of the variables in your formula is of the wrong type (e.g. text value when a numeric value is expected).

Answer:

B. #VALUE

Explanation:

Occurs if one of the variables in your formula is of the wrong type (e.g. text value when a numeric value is expected).

Breaking difficult problems down into smaller more manageable pieces is an example of

Answers

Answer:

Divide and Conquer

Explanation:

IN JAVA
Using a for loop, write a program that prompts the user to input a positive integer. It should then print the multiplication table of that number.

Enter a positive integer: 5


Example output:

0 0 0 0 0 0 0 0 0 0 0

0 1 2 3 4 5 6 7 8 9 10

0 2 4 6 8 10 12 14 16 18 20

0 3 6 9 12 15 18 21 24 27 30

0 4 8 12 16 20 24 28 32 36 40

0 5 10 15 20 25 30 35 40 45 50

Answers

import java.util.Scanner;

public class JavaApplication67 {

   

   public static void main(String[] args) {

       Scanner scan = new Scanner(System.in);

       System.out.print("Enter a positive integer: ");

       int num = scan.nextInt();

       while (num < 0){

           System.out.println("Please only enter positive numbers!");

           num = scan.nextInt();

       }

       

       for (int i = 0; i <= 10; i++){

           System.out.println(num*i);

       }

       

   }

   

}

This displays the given integer's multiplication table up to 10.

Match each statement from the passage with the message it represents.
People can trustthatthere
are no has de efects
from the ingredients in
bear food
People need to submit a
pettion to the government
asking for more research
about acklitives they are
concerned about
It is important to ake the
time to learn the chemical
makeup ofloods before
eating them
The presence ofchemicals
in additves should not
be a cause for concern.
Passage Statement
Author's Message
Today, food and color
additives are more strictly
studied, regulated, and
monitored than at any
other time in history
In fact, every food we eat
is made up of chemical
compounds that determine
flavor, color, texture,
and nutrient value.

Answers

Answer:

Here is the answer:

The matchup of the people in regards to trust is given in the image check more about the word trust below.

What makes a person trust in others?

Trust is a virtue that is not gotten by everyone. People are said to be very likely to trust another person if they are said to believe that the action a person does match up with their values and principles.

Conclusively, note that the idea of trust often deals with one's integrity in terms of our actions and behavior and as such people submit to those they fell they can trust.

Learn more about trust from

https://brainly.com/question/6983872

middle of test help pls
Which of the following could be a possibility in the future?


A voice-activated computers

B computerized glasses

C holographic messages

D computerized watches

Answers

Answer:

I'm thinking d

Explanation:

i dont think we are advanced enough to do a,b, or c.

so imma say d

Answer:

all

Explanation:

What can hack or code can I use to get a shadow or frost dragon in adopt me

Answers

There aren’t any codes that could be used to redeem a Shadow Dragon or a Frost Dragon. Even if you’re desperate, do not hack the game as it would get you a permanent ban from the game forever. Try trading up to your dream pet instead of cheating to achieve it!

what is a common use for spreadsheets? A.drawing B.writing C.budgeting D.video production

Answers

Answer:

b

Explanation:

he three most common general uses for spreadsheet software are to create budgets, produce graphs and charts, and for storing and sorting data

The common use for spreadsheets is budgeting.

A budget is a financial plan that estimates income and expenses for a specific period of time, such as a month or a year.

Thus option C is correct.

Here,

A spreadsheet is a tool used to organize, analyze, and store data in tabular form. The data is stored in cells that are usually arranged in a rectangular grid of rows and columns.

Spreadsheets can be used for a variety of purposes, including data analysis, budgeting, inventory management, and project management.

Using Spreadsheets for Budgeting: Budgeting is a common use for spreadsheets. A budget is a financial plan that estimates income and expenses for a specific period of time, such as a month or a year.

Spreadsheets can be used to create budgets by entering data such as income sources, expenses, and savings goals into the cells of a worksheet.

Thus option C is correct.

Know more about spreadsheets,

https://brainly.com/question/11452070

#SPJ6

importance of using information and communication technology in personal life

Answers

Answer:

ICT has a great impact in our daily lives. ... It can improve the quality of human life because it can be used as a learning and education media, the mass communication media in promoting and campaigning practical and important issues, such as the health and social area.

Explanation:

Find and enter the correct amount. 5 9 of a $18 restaurant bill = $

Answers

Answer:

Calculate a tip or gratuity and get the total amount to pay. Enter your meal or dinner cost along with the tip percentage.  If you are splitting the cost at a restaurant among several people you can divide by the number of people to get the total cost each.  Optionally round the results to dollars.

BRAINLIEST PLEASE

Tip = Cost * 0.xx

Total including Tip = Cost * 1.xx Explanation:

Sarah has to add a picture from her computer file and add a caption to it. Arrange the steps in a correct sequence.
click From File
click Insert
right-click the picture
click Picture
select the desired picture and again click Insert
write the caption and add it
click Insert Caption











Answers

Answer:

-Click insert

-Click picture

-Click from file

-Right click the picture

-Select the desired picture and again click Insert

-Click insert caption

-Write the caption and add it

Explanation:

Answer:

B: by right-clicking the bottom row, clicking Insert, then clicking Insert Row Below

Explanation:

I have a small business with only two computers. These computers are connected directly together and share resources. What type of network is established between these computers?
Extranet
Peer-to-Point
Internet
Peer-to-Peer

Answers

Answer:

Peer to peer

Explanation:

In its simplest form, a peer-to-peer (P2P) network is created when two or more PCs are connected and share resources without going through a separate server computer. A P2P network can be an ad hoc connection—a couple of computers connected via a Universal Serial Bus to transfer files.

A network is the binary instructions that a computer uses.
O False
O True

Answers

Answer:

False

I hope this helps. Cheers! ^^

Alex and Eva play football at the same local football pitches. Alex plays every 4
days and Eva plays every 6 days. They both played football today. After a
fortnight, how many times will they have played football on the same day?*​

Answers

12 days

Alex can only play with eva 4 days. A fortnight is 2 weeks and you can't go over

use the drop down menus to describe how adman can add shapes to his presentation

Answers

Answer:

✔ Illustrations

✔ a crosshair

✔ left-click and drag

Explanation:

I need help with question 2

Answers

The missing word is range.

The range function creates a list of numbers from x to y-1, where x is the leftmost number and y is the rightmost.

For instance,

range(1, 6) would be the numbers 1, 2, 3, 4, 5

Which method allows you to choose how to display the date and time?

localtime()

time()

strftime()

format()

Answers

The method that allows you to choose how to display the date and time is the format. The correct option is d.

What is a display?

The display is the screen of electronic devices. It is a display that is a computer output surface and projecting mechanism that presents text and frequently graphic pictures to the computer user.

It only has two possible values: black or white. The image's white color will be displayed as "white," while the other colors will be displayed as black. Once more, only the black and other colored things have changed; the white portion has not. The image's true color would be displayed.

A file format is a format of data that is stored in proper encoding. It also tells the information about bits used in the formation.

Therefore, the correct option is d. format.

To learn more about the display, refer to the link:

https://brainly.com/question/8566172

#SPJ2

Answer: "format()"

Explanation: Did it myself :)

The internet's data pathways rely on what kind of hardware device to route data to its destination?
servers
O ISPs
O routers
O IP addresses

Answers

Answer:

It is B router

Explanation:

Routers help with getting the WIFI from the ISP Internet Service Provider and then distribute it across your house-workplace  

Answer:

Explanation:

Edge 2022

Which of the following is not one of the four criteria for evaluating websites?

Question 1 options:

currency


content and accuracy


validity


authority

Answers

Answer:validity

Explanation:

Because it dont sound right

The option that doesn't belong to the criteria that can be used to  evaluate websites is C: validity.

evaluation of  websites can be regarded as the way to determine the value of information that can be found on the Internet.

Criteria that can be used in evaluation are;

Accuracy: this explains the reliability as well as correctness of the contentRelevance: this describe how important is the needed informationCurrency: this serve as the time period for the information.Authority:  this serve as source of the information.

Therefore, option C is correct.

Learn more at:

https://brainly.com/question/2510490?referrer=searchResults

4.11 lesson practice edhesive questions 4 and 5​

Answers

Answer:

It may just be me but I can't see the picture

Explanation:

Answer:

4. Monte carlo simulations

I need the answer for number 5 please.

Explanation:

Help me!!

Other Questions
Describe the actions of a committee member who abandons good manners. How were women involved in political protests in the 1760s? A recipe calls for 18 ounces of cream cheese with 15 ounces of sugar How many ounces of sugar are there per ounce of cream cheese? To draw a perfect circle, you'll need: A A protractor B. A sextant A compass D A spirograph 10 of 10 1. How does paragraph 1 prepare readers for the rest of the account? *O A. It describes how the scrolls were discovered.B. It introduces the scrolls and suggests their importance.C. It explains that the scrolls are really documents.D. It describes what scholars learned from the scrolls. i will give brainleasthow are you t5/12= -3/10Thank you if you help :) TRUE OR FALSE? 8 + 3 = 3 + 8 5 + 4x = 3d + 2 + 3 9- 3h = -3h + 9 What is the slope of the line that passes through the points (4, -1)And (-2,4) Plzzz help with this 10p 5Twenty sixth graders are going on a field trip. They will bedivided into 4 equal groups to take a tour. How manystudents will be in each group? Please hurry I need this fast Which area of the atomcontains the most mass, butthe least volume? Since yall so smart Write each fraction or mixed number as a decimal.9 29 40 Question 2(Multiple Choice Worth 5 points)(LC)Read this sentence:She was a tiger going after her prey as she ran to the finish line.What figure of speech is used in the sentence? Alliteration Metaphor Simile Personification The graph of y = sin(x + 4) compared to the graph ofy = sin x has moved: 1.Does the equation y = -x + 2 have apositive or negative slope? what is the 2 Summary of Main Events of the Story Dracula va chez la dentist Gemma and Leah are both jewelry makers. Gemma made 106 beaded necklaces. Leah made 39 more necklaces than Gemma.Each necklace they make has exactly 104 beads on it. How many beads did both jewelers use altogether while making their necklaces? Predict what will happen to the concentration of pyruvate, NADH and H+ when the Krebs cycle is stopped by arsenic.