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
Eduardwww [97]
3 years ago
13

Write a program that loops one thousand times. add all the even numbers and display the results. add all the odd numbers and dis

play the results.
Computers and Technology
1 answer:
tekilochka [14]3 years ago
5 0
# Python v3

odd = 0
even = 0

for i in range( 1000 ): # Note: zero indexed!
    if( i % 2 ):
        even += i
    else:
        odd += i

print( "The even numbers add up to %d" % even )
print( "The odd numbers add up to %d" % odd )
You might be interested in
Which of the following image file formats uses lossy file compression?
enyata [817]

Answer:

JPEG

Explanation:

5 0
3 years ago
Which task is a part of the analysis phase of the SDLC
eduard
Following are the seven phases of the SDLC:Planning (1), Systems Analysis (2), Systems Design (3), Development (4), Testing (5), Implementation (6) and Maintenance (7)
8 0
3 years ago
Read 2 more answers
Tiling is when a browser loads a background image and then repeats the image in both the vertical and horizontal directions unti
jeyben [28]
The correct answer is true
7 0
3 years ago
Read 2 more answers
Pascual specializes in fixing computers. He gets great personal satisfaction out of spending hours working on them, and he has a
Nataly_w [17]

Answer:

expert

Explanation:

Based on the information provided within the question it can be said that the Pascual would be considered an expert on computers. In developmental terms, this refers to someone that has a deep understanding in a particular field as well as the skills and experience needed through lots of practice and education in that specific field. Which in this case is computer hardware.

8 0
3 years ago
You are given 4-bit ripple carry adders and logic gates you have learnt about in the class (AND, OR, NOT, XOR, XNOR, NAND, NOR).
katrin2010 [14]

Answer:

See the constructed 12-bit adder/subtractor from the components below

Explanation:

5 0
3 years ago
Other questions:
  • The purpose of the ____________ element is to provide a method for a browser to display different images depending on specific c
    14·1 answer
  • You've been hired as a consultant to help an online store owner. You need to complete the implementation of conversion tracking
    5·1 answer
  • Jimmy and his friends are creating a rock band and have decided to turn his garage into a recording studio. He wants to sell the
    9·2 answers
  • Which option is most likely used to create many-to-many relationships in Access?
    8·1 answer
  • Below is a 4-bit down-counter. What is the largest number of the counter if the initial state Q3Q2Q1Q0=0011? (D3 and Q3 are MSB,
    14·1 answer
  • Please check my answer! (Java)
    7·1 answer
  • Find the simple interest Jay owes on a five-year student loan of $48,000 with an annual interest rate of 5%.
    6·1 answer
  • Refer to the method f: Public int f( int k, int n ) { if( n == k ) return k; else if( n > k ) return f( k, n - k ); else retu
    8·1 answer
  • Write modified code that will generate a random number between 0 and 255 when a button is pressed and will write the number to t
    14·1 answer
  • What is an outcome in a game? Don't search google just give me an answer
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!