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
guajiro [1.7K]
4 years ago
6

Write a program that prompts the user to input an integer and then outputs both the individual digits of the number and the sum

of the digits. For example, it should output the individual digits of 3456 as 3 4 5 6, output the individual digits of 8030 as 8 0 3 0, output the individual digits of 2345526 as 2 3 4 5 5 2 6, output the individual digits of 4000 as 4 0 0 0, and output the individual digits of -2345 as 2 3 4 5.
Computers and Technology
1 answer:
otez555 [7]4 years ago
3 0

Answer:

Explanation:

#Using python to create the list

#first we create an empty list to store our numbers.

import math

data = []

x = 0

InputSum = 0

NumInput=int(input("how many number do you want to add"))

while x <=(NumInput):

   Input=int(input("Enter the numbers here"))

   data.append(Input)

   x = x+1

   InputSum = InputSum + Input  #this is to add the numbers entered

print("The number you entered are ")

print(*data)  #this print the numbers entered

print("The sum of the numbers is", InputSum)

You might be interested in
If you are interested in working for a specific company, what type of job site should you look at for opening?
Ainat [17]

Answer:

if you are finding to be a pilot you can find it at jinnah airport

Explanation:

3 0
3 years ago
Imagine your friend wants to apply
mojhsa [17]
What do ur friend wants to apply for ?
7 0
4 years ago
Hioo ^U^
AlexFokin [52]

Answer:

Hie ......... . thanks for the points

Have a good day

6 0
3 years ago
A. Calculate the diffusion coefficient for magnesium in aluminum at 450°C.
SIZIF [17.4K]

Answer:

a) D = 4.88 * 10^(-14) m^2 / s

b)   <em>t </em>= 1.1 hr

Solution:

a) Magnesium in Aluminum diffusion:

D = Do * exp(-Qd / RT)

  =  (1.2 * 10^(-4) m^2 / s) * exp ( - 130,000 / 8.31 * 723.15)

  = 4.88 * 10^(-14) m^2 / s

D = 4.88 * 10^(-14) m^2 / s

b) The composition remains same at say the distance Xo:

(Cx - Co) / (Cs - Co) = Constant

Xo^2 / D_{550} * <em>t </em>= Xo^2 / D_{450} * 15

D_{550} * <em>t </em>= D_{450} * 15

(1.2 * 10^(-4) m^2 / s) * exp ( - 130,000 / 8.31 * 723.15) * <em>t</em>

(4.88 * 10^(-14) m^2 / s) * 15

by, solving for <em>t </em>we get:

 <em>t </em>= 1.1 hr

So, the time required is 1.1 hr.

5 0
3 years ago
Write a program to input an integer num from the keyboard and: : find the area of a square whose side length is num. : find the
NeX [460]

Answer:

# include<iostream>  

# include<math.h>  

using namespace::std;  

void calc (int num)  

{

     cout<<"Area of Square" <<num*num;   

     cout<<"Volume of a sphere" << (4/3) *3.14*num*num*num;

     cout<<"Side of a Square" <<sqrt(num);  

     }  

int main ()  

{  

     int num;

     cout<<"Enter the Number"; cin>>num;  

      calc(num);  

      return 0;  

}  

Explanation:

I have used the swtich for the selection purpose. Also, I have used sqrt() function, and for that I have included math,h library.  And the various formula comes from mensuration. Rest part is self explanatory.

3 0
4 years ago
Other questions:
  • Write a copy assignment operator for CarCounter that assigns objToCopy.carCount to the new objects's carCount, then returns *thi
    7·1 answer
  • Open a command prompt on pc-a and pc-b and type ipconfig /all. what are the ethernet adapter physical addresses?
    7·1 answer
  • Which of the following is true regarding packaged software and custom software? Group of answer choices Packaged software are ap
    13·1 answer
  • Professionalism is defined as what?<br> ASAP PLEASE!
    11·1 answer
  • 4. Why does Hancock believe that our communication online is more honest than we might<br> expect?
    15·2 answers
  • State the name of each of the storage devices described below.
    14·1 answer
  • . What process skill would a scientist use to find the length of a line
    5·1 answer
  • . Which responsibility belongs to the marketing function?
    11·1 answer
  • The math club starts with 5 members. Five months later, their membership has grown to 50 members.
    5·2 answers
  • Make and run a Python program which:
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!