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
Svetllana [295]
3 years ago
6

Write a Python program that inputs an integer between 0 and 1000 and adds all the digits in the integer. For example, if integer

is 634, the sum of all its digits is 13.
Computers and Technology
1 answer:
nignag [31]3 years ago
5 0

I've included my code in the picture below.

You might be interested in
Can i get any information on this website i'd like to know what its for ?
zloy xaker [14]

Explanation: torsearch.org is a safe search engine mainly used for dark wed purposes. It does not track your location nor give any personal information.

8 0
3 years ago
Implement a function getContent() that takes as input a URL (as a string) and prints only the text data content of the associate
Reil [10]
Print is good but url is not
3 0
3 years ago
A system forensics specialist has three basic tasks related to handling evidence: find evidence, preserve evidence, and ________
dmitriy555 [2]

Answer:

It would be Store

Explanation:

hope this helps if not sorry :(

3 0
3 years ago
Computers are able to think like human beings
Nadusha1986 [10]

Answer:

I don't understand the question

6 0
3 years ago
My code get an input of 1900 and it should output not a leap year but it fails first line of code. It should output not a Leap a
marshall27 [118]

Answer:

Explanation:

The code does not fail on the first step since 1900 divided by 4 is actually 475 and has no remainder, meaning that it should return True. The code won't work because the if statements need to be nested in a different format. The correct algorithm would be the following, which can also be seen in the picture attached below that if we input 1900 it would output is not a leap year as it fails on the division by 400 which gives a remainder of 0.75

input_year = int(input())

if input_year % 4 == 0:

   if input_year % 100 == 0:

       if input_year % 400 == 0:

           print(input_year, "is a leap year")

       else:

           print(input_year, "- not a leap year")

   else:

       print(input_year, "is a leap year")

else:

   print(input_year, "- not a leap year")

3 0
3 years ago
Other questions:
  • WILL GIVE BRAINLIEST! A rent payment is an example of which type of expense?
    14·2 answers
  • Which of the following is not an impact device?<br> Joy Stick<br> Track Ball<br> Mouse<br> Printer
    10·1 answer
  • My computer have black spots and line
    7·2 answers
  • Question 9/10
    14·2 answers
  • Interpretations of the AICPA Code of Professional Conduct are dominated by the concept of: Question 4 options: 1) independence.
    5·1 answer
  • #include &lt;iostream&gt;
    9·1 answer
  • Network topology is a direct representation of
    9·1 answer
  • One of the best ways to shoot a picture is to frame the subject in the middle of the screen or viewer. T or F
    14·2 answers
  • Durante 10s, la velocidad de rotación y el momento de giro de las ruedas de un coche eléctrico son 100 rpm y 1405,92 Nm, respect
    15·1 answer
  • What steps should be taken to dispose of and recycle plastic?
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!