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
hoa [83]
3 years ago
7

Consider the following code:

Computers and Technology
1 answer:
Art [367]3 years ago
8 0

Answer:

The output is 252

Explanation:

To get the output, I'll analyze the lines of code one after the other.

Here, user enters 78. So, start = 78

start = int(input("Enter the starting number: "))

Here, user enters 45. So, stop = 45

stop = int(input("Enter the ending number: "))

This initializes x to -10

x = -10

This initializes sum to 0

sum = 0

This iterates from 78 to 46 (i.e. 45 + 1) with a decrement of -10 in each successive term

for i in range (start, stop, x):

This adds the terms of the range

     sum = sum + i

This prints the calculated sum

print(sum)

The range starts from 78 and ends at 46 (i.e. 45 + 1) with a decrement of -10.

So, the terms are: 78, 68, 58 and 48

And Sum is calculated as:

Sum = 78 + 68 + 58 +48

Sum = 252

<em>Hence, 252 will be printed</em>

You might be interested in
In what way do networks help to protect data
Aleksandr-060686 [28]

One way that computer networks help to protect data is by backing up the data.

Computer networks are normally formatted to automatically back up all of the data that is stored on them. This protects the data in case of any type of computer system failure.

5 0
4 years ago
What is the memory of a computer called
Nataliya [291]
It is called Ram in another term for memory :)
6 0
3 years ago
Read 2 more answers
What are career values
NikAS [45]

Answer:hdhfnrjrjkejd

Explanation:

4 0
3 years ago
can someone help me write a 5 paragraph essay on microsoft word and why we need and how we use it? if you can please make it sou
DaniilM [7]
Here are some important points:
- we use it to do essays for school
- we can use it to do flyers for recreational events
- we can use it to do pamphlets to inform people
- it is versatile, so you can create many different types of documents
- you can create charts

This can be your opening statement

Today, there is a lot asked of a child in school. From charts to essay to projects, the average kid has at least 10 different programs they use just for one project. But there is one program that came along and changed everything, and that program is called Microsoft word. Microsoft word is valuable because it is versatile (what I wrote earlier about it being able to do many different tasks), it simplifies your experience (what i said about it being able to combine different programs into one), and it is free (you can write about how some programs charge to use their high-grade programs but microsoft is free and avaialabe on every windows
computer.)

GOOD LUCK !
4 0
4 years ago
Which of the following tasks requires you to use the Tabs option?
Monica [59]
Indenting a paragraph :)
7 0
4 years ago
Other questions:
  • What are the types of action involving data base?
    14·1 answer
  • _____ is a function performed by control programs that manages computer resources, such as storage and memory.
    11·1 answer
  • true /falseCompression of entries in the term-document matrix can be used to reduce run-time storage and execution-time requirem
    10·1 answer
  • Which layer defines an interface that applications can use to request network services, rather than referring directly to applic
    5·1 answer
  • List two reasons why “buying a computer is no easy task” ?
    12·2 answers
  • 4. Extrusion tools in Blender® duplicate vertices while keeping the geometry connected with the original vertices. (1 point)
    7·1 answer
  • Josh's boss asked him to write a letter to their customers explaining some upcoming price increases. But Josh was in a hurry to
    8·2 answers
  • How to create an app on app store please its not a joke, if someone knows tell me how
    15·1 answer
  • A university with remote campuses, which all use different service providers, loses Internet connectivity across all locations.
    12·1 answer
  • A keyboard would be considered what 2 things
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!