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
A(n) ________ file contains data that has been encoded as text, using one of the computer's encoding schemes.
tangare [24]

Hello there

the answer is text

hope this helps

Queen Z

8 0
3 years ago
Read 2 more answers
1. Answer the following questions: a. What are the different types of number system? Name them.​
BigorU [14]

Answer:

binary,decimal, hexadecimal and octal number system

5 0
2 years ago
What is the difference between above ground mining and underground mining?
neonofarm [45]
If this is in reference to diamond mining then above ground would be panning while below ground would be the actual mining into the soil. 
6 0
3 years ago
A store employee has a spreadsheet of the power tools he sells in Column A and their corresponding prices in Column B. In cell C
avanturin [10]

Answer:

Excel MIN Function

Explanation:

Excel MIN Function is used to get the smallest value which means, it returns the smallest value in the array(a set of data).

syntax is =MIN (number1, [number2], ...)

3 0
3 years ago
5. Bits are sent over a communications channel in packets of 12. (a) If the probability of a bit being corrupted over this chann
user100 [1]

Answer:

0.889

Explanation:

7 0
3 years ago
Other questions:
  • In fixed-width files, each record is on a separate line and the fields are separated by a special character.
    7·1 answer
  • What is the purpose of citations?
    13·1 answer
  • What should you do to help prepare yourself for the delivery of your presentation? you can chose more then one
    8·1 answer
  • You can use this type of program to create a new raster image
    9·1 answer
  • How do users log into Windows 8?
    7·1 answer
  • Which is a good way to improve your credit score
    5·1 answer
  • The birthday problem is as follows: given a group of n people in a room, what is the probability that two or more of them have t
    12·1 answer
  • Write a Python program that inputs an integer between 0 and 1000 and adds all the digits in the integer. For example, if integer
    6·1 answer
  • What is a common use for append queries?
    14·2 answers
  • Tamara is writing a program to organize students in a class and needs to use operators to organize student grades, then compare
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!