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
marin [14]
3 years ago
10

Write a program to input a number.Find the sum of digits and number of digits

Computers and Technology
2 answers:
BaLLatris [955]3 years ago
8 0

Answer:

<em>#Sum of Digits</em>

a = int(input("Enter a number: "))

sumofdigits = sum(int(dig) for dig in str(number))  

print("Sum of digits: ", sumofdigits)

<em># Number of digits</em>

count = 0  

print ("Total number of digits : ",len(str(abs(a))))

Explanation:

It is pretty self-explanatory however, I will tell it to you anyways. So, the sum of digits iterates to each digit and adds them up. For the number of digits, it uses in-built functions (length, string and absolute)

ki77a [65]3 years ago
7 0

omg a computer program

i love it

okay so i will assume taht you want the program to be in python

here we go

a = int(input("Enter a number ")

b = int(input("Enter another number ")

sum = a + b

def Digits(sum):

count = 0

while sum != 0:

sum //= 0

count += 1

return count

print(f"Sum is {sum} \nnumber of digits are {Digits(sum)}")

You might be interested in
I need them on this question
sweet [91]

Answer:

Extended wear contacts. ...

Toric contacts. ...

Colored (tinted) contacts

Explanation: hope this helps

4 0
3 years ago
Which internet explorer 11 feature enables it to correctly display pages that were developed using older technologies?
DedPeter [7]
The Internet Explorer 11 feature that enables you to do that is known as the compatibility view.
It means that this browser will make the pages developed using older technologies compatible with the new technologies, so that you can see them even though they were made in such different ways. Microsoft Word also has this option to view documents made using an older version of Microsoft Office.
5 0
4 years ago
Mr. stevens is the principal of a high school. why might he want to export data from a database of students’ exam scores? to cre
Archy [21]

Mr. Stevens wants to export data from database of students’ exam scores to create presentation using other software on how  the scores have changed throughout a semester.

<h3>What is database?</h3>

The database is the collection of data which is arranged in proper manner generally electronically in computer system for the easy access and latter use.

The database also help to analyse the data. The data is export from database for following reasons-

  • For backing up the important data.
  • To move the data from two different program version.  

Mr. stevens is the principal of a high school. He want to export data from a database of students’ exam scores. With this data he can make presentation to analyze the scores.

Mr. Stevens wants to export data from a database of students’ exam scores to create a presentation using other software on how students’ scores have changed throughout a semester.

Learn more about the database here;

brainly.com/question/26096799

5 0
3 years ago
Read 2 more answers
Ismael would like to insert a question mark symbol in his document. What steps will he need to follow to do that?
myrzilka [38]

Answer:

Hold down the Shift key while pressing the required key.

6 0
3 years ago
Read 2 more answers
What is the relationship between the binary number system and computer hardware?
lesya692 [45]

Answer: is the method of representing numbers that count by using combinations of only two numerals.

Explanation:

5 0
3 years ago
Other questions:
  • Davia draws a shape with 5 sides. two sides are each 5 inches long. two other sides are each 4 inches long. the perimeter of the
    15·1 answer
  • If I want to make it look like slide number one is turning a page to slide number two, what effect needs to be applied?
    13·1 answer
  • In a certain computation, 90% of the work is vectorizable. Of the remaining 10%, half is parallelizable for an MIMD machine. Wha
    9·1 answer
  • An important strategy in survey design involves the use of terms, phrases, and words that are known to both the PI team and resp
    9·1 answer
  • When should you save your document?
    15·2 answers
  • The ____ data source class that reduce your need for accessing individual Data Provider class when you are connecting to an Acce
    15·1 answer
  • PC GAMER HELP!<br><br> What is -everything- I need to have a -GOOD- gaming area for a pc gamer?
    7·1 answer
  • Identify the technique to free up the CPU by allowing device controllers to independently transfer data between the device and m
    7·1 answer
  • What is the purpose of each component ?
    6·1 answer
  • Which of the following media forms is the Federal Communications Commission able to regulate content on?
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!