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

Answers

Answer 1

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)}")

Answer 2

Answer:

#Sum of Digits

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

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

print("Sum of digits: ", sumofdigits)

# Number of digits

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)


Related Questions

PODARDSRTH?HOW SPELLING

Answers

sorry, I d0nt understand

HELP!!!
Your friend is taking images from all over the internet without giving credit to the sources. He tells you that it’s no big deal, and no one will know or care, anyway. Help your friend by explaining why it is important to follow copyright laws when photos are needed.

Answers

Answer:

It is Important because, you could be in Jail for no giving the credit for the rightfully owner Also it is by Law to Tag his/her law.

Explanation:

Answer:

It is important to follow copyright laws when photos are needed because if you didnt take the photo yourself then you can get in really big trouble maybe even sued depending on the situation.Even in general, you need to say that the photos arent yours because you're stealing some one else's  works. you can also go to jail for it

Explanation:

taking credit for something in general that you didnt do is never a good thing it makes you look bad.

I need help with this question. asap please

Answers

Answer:

what are you talking about

Explanation:

can you help me with my question

2y/3 - y-1/6 + 7y-1/4 = 2 1/6​

Answers

I think is 31/80 hope it’s right

____ is an easy way to invitation through a web page​

Answers

Answer:

RSVP?

Explanation:

RSVP is the answer........

A brick has a weight of 23N. The brick is flat and smooth on the side in contact with the floor having measurements ( height= 5cm, length =20cm, width=10cm).
A)Calculate the area of the brick in contact with the floor. Give your answer in cm2.
B)Calculate the pressure of the brick on the floor.​

Answers

Answer:

A)Area = 200[tex]cm^{2}[/tex]

B) Pressure = 0.115 N/[tex]cm^{2}[/tex]

Explanation:

Assuming that the brick is flat on the floor with its largest face towards the floor and not on its side, then we can calculate the area of that face by multiplying the length by the width like so...

Area = length * width

Area = 20cm * 10cm

Area = 200[tex]cm^{2}[/tex]

The formula for calculating pressure is force divided by area. Therefore, since we just finished calculating the area and the force is given to us in the question (23N) we can simply plug in these values and solve for the pressure.

Pressure = Force / Area

Pressure = 23N / 200[tex]cm^{2}[/tex]

Pressure = 0.115 N/[tex]cm^{2}[/tex]

What is the function of a computer’s operating system?

It is a software program that controls some of the actions of a computer, but not startup program functions or Internet access.
It is a software program that controls all of the actions of a computer, with the exception of startup program functions.
It is a software program that exclusively controls a computer’s startup program functions.
It is a software program that controls all of the actions of a computer, including startup program functions.

Answers

Answer: It is a software program that controls all of the actions of a computer, with the exception of startup program functions.

In a mobile app for computer technicians in a large college, an initial trigger event could be ____.

A) Acquiring a new toner cartridge

B) Recording the printer's inventory number

C) A service request about a printer out of toner

D) A record in a database

Answers

Answer:

In a mobile app for computer technicians in a large in a large college, an initial trigger event could be

C) A service request about a printer out of toner

Explanation:

Computer technicians maintain and repair servers and computers, the tasks of the computer technicians can include maintaining computer computer networks. Computer technicians also work on output devices such as monitors and printers

A mobile app that provides an interface between the university community and the computer technicians in the university can be used to provide feedback about the current state of the IT services experience within the university

Items such as printer out of toner or lack of internet within a particular area within the university or lack of email service are trigger events that will require the intervention of the computer technicians within the university

What is the code for drawing a hexagon on python programming?

Answers

Answer:

In this article, we will learn how to make a Hexagon using Turtle Graphics in Python. For that lets first know what is Turtle Graphics.

Turtle graphics

Turtle is a Python feature like a drawing board, which let us command a turtle to draw all over it! We can use many turtle functions which can move the turtle around. Turtle comes in the turtle library.The turtle module can be used in both object-oriented and procedure-oriented ways.

Some of the commonly used methods are:

forward(length): moves the pen in the forward direction by x unit.

backward(length): moves the pen in the backward direction by x unit.

right(angle): rotate the pen in the clockwise direction by an angle x.

left(angle): rotate the pen in the anticlockwise direction by an angle x.

penup(): stop drawing of the turtle pen.

pendown(): start drawing of the turtle pen.

Approach –

Define an instance for turtle.

For a hexagon execute a loop 6 times.

In every iteration move turtle 90 units forward and move it left 300 degrees.

This will make up Hexagon .

Below is the python implementation of above approach.

Other Questions
explain how 7/10 and 70/100 are equivalent decimals The sun warms the air directly. Do you agree or disagree with this statement? What evidence supports your ideas? Find the coordinates of the point where the lines with equations y=x and y=-6 intersect Explain one weakness of urban models in explaining patterns of settlement The population of a city has decreased by 33% since it was last measured. If the current population is 13,400, what was the previous population?0?Continue What is 27^2/3 simplified Does anyone know the answer? Why wasn't the water pasteurized? I chose Claim 1: If you follow the instructions, the POW kits will always heat the water above the correct temperature for pasteurization (65C), but some people didn't follow the instructions Can someone help me support it? What is the value of the digit 6 in this number? Write your answer in number form.647,013,020 Light shoots out of a single source in different directions. True or false?truefalse 63 is 75% of what number? Enter your answer in the box. Express 0.0038610-4 in standard form?(Urgent....Answer if sure) what is the area of this shape? If someone sprays perfume in the another room it can be smelled a few hours later i need help finding the answer to this problem and ima a 6th grader lo Lugares Junsticos de landras10 lugares tursticos de Honduras why did scrooge say his life is short in the christmas carol? https://photos.app.goo.gl/m5y1oUENPHQDvodZ7 Need help ASAP please Select the correct answer.Which statement describes the end behavior of the exponential function f(x) = 2x - 3?A.) For very high x-values, f(x) moves toward positive infinity.B.) For very high x-values, f(x) moves toward negative infinity.C.) For very high x-values, f(x) moves toward the horizontal asymptote.D.) For very low xvalues of x, f(x) moves toward negative infinity. how do you think America would react to fascism/nazism spreading across Europe Linnea is renting a bike. It costs $4.50 per hour plus a $5 deposit. a. Draw a line to show the relationship between the number of hours a bike is rented, x, and the total cost of renting a bike, y.