plzz help me with this question.........

Write a program to input a number find the sum of digits and the number of digits. Display the output

sample input - 7359
sample digits - 24
number of digits - 4​

Answers

Answer 1

Answer:

str = input("Enter a number: ")

sum = 0

for c in str:

   sum = sum + int(c)

print("Sample input - {}".format(str))

print("Sum of digits - {}".format(sum))

print("Number of digits - {}".format(len(str)))

Explanation:

That's python. Was that what you were looking for?

Answer 2
Answer Using Java :-

import java.util.*;

public class Digit

{

public static void main(String args[ ] )

{

Scanner in=new Scanner (System.in)

System.out.print("Enter a number: ");

int n = in.nextInt();

int sum = 0, count = 0;

while (n!=0)

{

int d = n % 10;

sum + = d;

count++;

n /= 10;

}

System.out.println("Sum of digits=" +sum);

System.out.println("Number of digits=" +count);

}

}


Related Questions

help me i dont understand REAL ANSWERS PLS

Answers

Answer:

it's answer is B

hope it helps you

Users of a _____ database have access through their personal computers linked to local or wide area networks

Answers

Answer:

Company

Explanation:

A company database is a database of a firm or organization that contains the information about the firm's employees, their products, services, and as well their client's and customers' details.

This is often kept on the main database server and arranged and organized by a database administrator.

Hence, Users of a COMPANY database have access through their personal computers linked to local or wide area networks

Which visual novels do you recommend and why?

Answers

Answer:

I rec recommend Fate/Stay Night. It's honestly so good!

Explanation:

Which of these purchases is most likely to be paid for with a credit card
A. Soda
B. Lotto ticket
C. Parking fee
D. Plane ticket

Answers

Answer:

plane ticket?

Explanation:

Please Help, Thank you!

-State whether- True or False :

a) Bluetooth uses Radio waves...
b) White hackers steal confidential information...
c) Hub transfers send the incoming data to the desired
destination only...
d) Infra-red signals are suitable for long distance data
communication...
e) HTTP is used in between a web server and a web browser...
f) LAN (Local Area Network) is the network exists around a person...
g) Coaxial cable consists of a copper conductor (wire)...
h) Microwave antennas are located at a substantial height above
the ground level...
i) Firewall can be implemented as a software, hardware or a
combination of both...

Please, please help me!♡´・ᴗ・`♡

j) Star topology is complicated to set up...

Answers

Answer: Devices connected in a Bluetooth network communicate with each other using ultra-high frequency (UHF) radio waves. These are electromagnetic waves with frequencies around 2.4 gigahertz (2.4 billion waves per second). UHF waves of different frequencies are used in microwave ovens, GPS systems and many other devices, White hat hackers employ the same methods of hacking as black hats, with one exception- they do it with permission from the owner of the system first, which makes the process completely legal. ... There are even courses, training, conferences and certifications for ethical hacking. A hub connects multiple computers together in a Local Area Network (LAN). All information sent to the hub is then sent through each port to every device in the network.

Hubs are unable to tell one computer from another, so they receive information on one port and then blindly forward it to all other ports — whether it was intended for those computers or not.

So even though you may only want to send information to one other computer, if you have five total computers on your network, then there will be four other computers receiving data that wasn’t intended for them. Showing results for are Infrared signals are suitable for long distance data communication..

Search instead for are Infra-red signals are suitable for long distance data communication..

Infrared laser systems can also be used for long-range communication (up to about 2.4 kilometres), with a maximum projected data rate of 16 Mbps. ... An infrared transmitting device, either a light-emitting diode (LED) or a laser diode, converts an electrical signal to an optical signal.

Web Browser is a software which is used to browse and display pages available over internet whereas web server is a software which provides these documents when requested by web browsers. ... Web browser sends an HTTP Request and gets a HTTP Response. Web server receives HTTP Request and sends a HTTP Response.

Simple LANs generally consist of cabling and one or more switches. A switch can be connected to a router, cable modem, or ADSL modem for Internet access. A LAN can include a wide variety of other network devices such as firewalls, load balancers, and network intrusion detection.

Coaxial cable, or coax (pronounced /ˈkoʊ. æks/) is a type of electrical cable consisting of an inner conductor surrounded by a concentric conducting shield, with the two separated by a dielectric (insulating material); many coaxial cables also have a protective outer sheath or jacket.

Terrestrial microwave- The most common type of microwave antenna is the parabolic “dish.”A typical size is about 3 m in diameter. The antenna is fixed rigidly and focuses a narrowbeam to achieve line-of-sight transmission to the receiving antenna. Microwave antennasare usually located at substantial heights above ground level to extend the range betweenantennas and to be able to transmit over intervening obstacles. To achieve long-distancetransmission, a series of microwave relay towers is used, and point-to-point microwave linksare strung together over the desired distance. Used in long haul telecommunicationsservice, as an alternative to coaxial cable or optical fiber.

You can implement a firewall in either hardware or software form, or a combination of both. Firewalls prevent unauthorized internet users from accessing private networks connected to the internet, especially intranets

Which of the following best describes the protocol used on the internet?

Answers

Answer:

The protocols of the Internet are open and used by all devices connected to the network

Explanation:  

There are billions of devices connected to the Internet, and hundreds of different kinds of devices: laptops, tablets, phones, refrigerators, handheld credit card readers, and so on. Protocols (standards) ensure that the variety of devices interact with each other smoothly.  There are a lot of protocols! The Internet was designed with several layers of abstraction that sort the protocols according to what part of the process they support.

identify the information that's safe to send via e-mail

Answers

Answer:

nonehdbdjsjnajsjfjsap

Explanation:

baba booey

i need help, thank you

Answers

Answer:

uhh yes?

Explanation:

i think people can go on weeks without food, so a set of trays wit food should last them a day

Ohhh I’m here and I also say yes one set can be enough if used wisely

help now ASAP, and thank you

Answers

Answer: True

Oxygen is needed to combust/ignite the fuel that is mixed in, which provides the heat and thrust to push the jet forward. On a chemical level, the oxygen (O2) mixes with whatever the fuel chemical may be. Recall that oxygen is often used to burn things, due to oxygen effectively breaking the bonds of the fuel chemical and unleashing its stored potential chemical energy.

8.10 Code Practice Question 3

Can someone please help cause this has me lost I took a picture of the question because that would be too much to try and type.

I’m sorry if the quality is bad I tried to get a good angle!

Answers

terms = ["Bandwidth", "Hierarchy", "IPv6", "Software", "Firewall", "Cybersecurity", "Lists", "Program", "Logic",

        "Reliability"]

def swap(arr, in1, in2):

   w = arr[in1]

   arr[in1] = arr[in2]

   arr[in2] = w

print(terms)

swap(terms, 5, 1)

swap(terms, 2, 4)

swap(terms, 3, 5)

swap(terms, 5, 6)

swap(terms, 6, 8)

swap(terms, 8, 9)

print(terms)

This is how I interpreted the question. If I need to make any changes, I'll do my best. Hope this helps though.

The program is an illustration of lists and list manipulation

Lists

Lists are variables that are used to hold multiple values in one variable name

Python Program

The program in Python, where comments are used to explain each line is as follows:

#This defines the swap function

def swap(arr, pos1, pos2):

    myList = arr[pos1]

    arr[pos1] = arr[pos2]

   arr[pos2] = myList    

#This initializes the list

terms = ["Bandwidth", "Hierarchy", "IPv6", "Software", "Firewall", "Cybersecurity", "Lists", "Program", "Logic", "Reliability"]

#This prints the list elements

print(terms)

#This swaps the second and the sixth list elements

swap(terms, 5, 1)

#This swaps the third and the fifth list elements

swap(terms, 2, 4)

#This swaps the fourth and the sixth list elements

swap(terms, 3, 5)

#This swaps the sixth and the seventh list elements

swap(terms, 5, 6)

#This swaps the seventh and the ninth list elements

swap(terms, 6, 8)

#This swaps the ninth and the tenth list elements

swap(terms, 8, 9)

#This prints the list elements

print(terms)

Read more about lists and list manipulations at:

https://brainly.com/question/24941798

Which popular file format loses some of the information from the image? JPEG TIFF RAW NEF

Answers

Answer:

The popular file format that loses some of the information from the image is JPEG

Explanation:

what is multimedia computer system​

Answers

A Multimedia can be defined as any application that combines text with graphics, animation, audio, video, and/or virtual reality. Multimedia systems are used for security to keep intruders out of a system and for the protection of stored documents

Which best defines what a script tag does?

Answers

Answer:

The answer to your question would be C , A tag used to write programming scripts.

Explanation:

The  element either contains scripting statements, or it points to an external script file through the src attribute. Common uses for JavaScript are image manipulation, form validation, and dynamic changes of content. Hope this helps you! </p><p></p>

ASCII is a common format for the representation of characters in writing code. How many characters can be represented in the standard ASCII encoding

Answers

Answer:

A total of 128 characters can be represented in the standard ASCII encoding.

Explanation:

The American Standard Code for Information Interchange (ASCII) was created to make an international standard for encoding the Latin letters. In 1963, ASCII was received so data could be deciphered between PCs; speaking to lower and upper letters, numbers, images, and a few orders.

Since ASCII is encoded using ones and zeros, the base 2 number framework, it uses seven bits. Seven bits permits 2 to the power of 7 = 128 potential blends of digits to encode a character.

ASCII consequently ensured that 128 significant characters could be encoded.

HELP PLZZ Which statement is true? Select 3 options.


A. A function must have a return value.

B. A function can use variables as parameters.

C. The definition of a function must come before where the function is used.

D. The definition of a function can come before or after it is used.

E. A function can have more than one parameter.

Answers

Answer:

B. C. E.

hope this helps :D

Answer:

The definition of a function must come before where the function is used.

A function can have more than one parameter.

A function can use variables as parameters.

Explanation:

Nadia's productivity at work is being hurt due to the large quantity of unwanted e-mail she receives. What steps can she take to reduce the amount of e-mail she receives?

Carefully read and complete subscription forms.

Read e-mail messages every hour.

Stop using the Internet.

Forward spam to spam at uce.gov.

Stop posting her e-mail address on newsgroups.

Answers

Answer:

I think that carefully reading and completing subscription forms is important and could possibly lower the amount of emails.

Reading them every hour will only hurt her work ethic.

Stop using the internet won't help at all.

Forwarding the spam to spam at uce.gov could work because that's what the site was made to do.

Stop posting her e-mail address on newsgroups could definitely help.

I'm stuck between the 1st, 4th, and 5th one but its one of them.

How many answer choices are you allowed?

It is steps plural.

Answer:2,3,5

Explanation:

explain the purpose of a web server (4marker)

Answers

It's a computer program that distributes web pages as they are requisitioned. The basic objective of the web server is to store, process and deliver web pages to the users. This intercommunication is done using Hypertext Transfer Protocol (HTTP).

Answer:

A web server is hardware that is dedicated to running the software. A web server can contain one or more websites, and does what clients want and can process incoming network requests.

write a QBASIC program to input two sides of a rectangle from the user and print its area and perimeter [Area = L×B, Perimeter =2 (L+B)]​

Answers

Answer:

CLS

INPUT"ENTER THE LENGTH";L

INPUT"ENTER THE BREADTH";B

AREA=L*B;A

PERIMETER=2(L+B);P

PRINT"THE AREA IS =";A

PRINT"THE PERIMETER IS =";P

END

Which term refers to the portion of the hard drive where print jobs are stored before going to the print device

Answers

Answer:

Print Queue.

Explanation:

I majored in Technology

Printer spoolers, which queue print jobs and send them one at a time to a printer, should not be confused with printer drivers.

What print jobs are stored before going to the print device?

In order to enable control of print queue actions like stopping, restarting, or canceling tasks, a print queue provides users with printer management features. Some print queues let users rearrange the queue's order and assign print jobs a higher priority.

Messages that need to be printed are gathered in print queues. An Unspecific print queue can be started or canceled.

Applications can print with the help of printer drivers without having to be aware of the specific technical specifications of each printer model.

Therefore, The area of the hard disk where print jobs are kept before being sent to the printer is referred to as the print queue.

Learn more about print device here:

https://brainly.com/question/4005823

#SPJ6

hey plz help, and thanks

Answers

Answer:D im pretty sure

Explanation:im sorry if get it wrong So sorry ok just sorry

D maybe??? Sorry if it’s wrong

Which background-repeat value represents this div?
repeat

repeat-y

repeat-x

no-repeat

Answers

Answer:

repeat-y ................ ..

heeeeeeeeeeeelp idek plz help

Answers

Answer:

b

Explanation:

What are specific and relevant terms that will help you locate information using an internet search engine?

A: Keywords

B: Search Words

C: Smart Words

D: Unusual Words

please help me!!​

Answers

I would say A:keywords

Hope this helps

I’m sorry if this is wrong

Have a great day/night

Answer:

keyword

Explanation:

i got it right

Sharing contacts is different from sharing a calendar. Use the drop-down menus to explain how.
1. You can share contacts with
outside the organization without publishing online.
2. You are not able to that somebody share their contacts with you.
3. Both calendars and contacts are shared in emails. For the latter, the recipient clicks
and selects from a list.

Answers

Answer:

anyone

request

open shared contacts

Explanation:

edge 2020

Answer:

anyone

request

open shared contacts

Explanation:

What is the highest numeral in a decimal code?

A. 9
B. 5
C. 2
D. 1

Answers

Answer:

9

Explanation:

1.8, 1.9, 2.

~theLocoCoco

What predefined match policy allows viewers to watch a claimed video but does not allow ads to display on the video

Answers

Answer:

The correct response is "Track".

Explanation:

Tracks encourage the individual that listens to that same music video to miss or ignore that same starting of almost any soundtrack at a certain moment. It might also impact an individual who accompanies a facility that implements or obeys guests.

For obvious reasons, a digital ad service can track client's internet search engine behavior patterns to continue providing accurate recommendations.

. In this project, how many times will the [Drive] block be repeated?
a
It will be repeated forever
It will repeat 100 times.
It will repeat 90 times.
It will repeat once.
c

Answers

Answer: wait is a multiple answers to it or

Because I think it’ll be forever

Explanation:

The ______ occurs in first-come-first-served scheduling when a process with a long CPU burst occupies the CPU. Group of answer choices

Answers

Answer:

convoy effect

Explanation:

The Convoy effect is an episode in Operating System, in which if the burst time of the first process is high among all the processes, then it effects the First-Come-First-Serve algorithm.

Just like in real incidents, when a convoy is heading first in the slows down the vehicles behind; same happens in the Operating System. If long CPU burst occupies first in the ready queue, then it slows, or even in some cases, block other low processes. This effect is also known as starvation.

Therefore, the correct answer is convoy effect.

Describe the history of computer in Nepal.​

Answers

Answer:

The first computer brought in Nepal was IBM 1401 which was brought by the government in lease for the population census of 1972 (2028 BS). Later in 1975 (2031 BS)YantrikSarinikaran Kendra (Electronic Data Processing Centre) was established which was later called as National Computer Centre ( NCC )

Answer:

The first computer brought in Nepal was IBM 1401 which was brought by the government in lease for the population census of 1972 (2028 BS). Later in 1975 (2031 BS)YantrikSarinikaran Kendra (Electronic Data Processing Centre) was established which was later called as National Computer Centre ( NCC )

Explanation:

if this answer is correct please make as brainlelist

⚠️ HURRY TIME IS TICKING ⚠️
Sierra needs to ensure that when users are entering data into a datasheet or form that they are limited in the values that they select. Which option should she use as the data type?
• Lookup list
• Bound value
• Short-text
• Date/time

Answers

Answer:

To ensue that data entering data is limited, Usually A dropdown list is used but here in the available option

Lookup list is correct.

Explanation:

Let explain why we have selected Lookup list

A lookup list is used to look for some value in a list.

For example in Excel we select a column for search which is basically limiting the value which we search.

Bound Value

we usually have 2 bounds ,

lower and upper bound

lower bound is the smallest value in a set while upper bound it the highest value in a set.

Short Text:

Short text is used to minimize the word.

For example instead of United States we simply write US

Date/Time are used for data/time value.

so the most appropriate answer is Lookup list.

Other Questions
ALL MY POINTS!! ANSWER NOW PLEASEEE Melting can be best described as a process in which molecules? why the people do the education if m=3 and n=-4 calculate the value of mn +n Please help me I will give you the brain thing and extra points (image below) 1/5 Is (x + 5) a factor of f(x) = x3 4x2 + 3x + 7? Use either the remainder theorem or the factor theorem to explain your reasoning. This is worth 100 points. Will mark brainliest. Whatever you want. Please answer this. What is the inequality of the graph? A solution isQuestion 6 options:a homogeneous mixture.a compound.chemically separable.a heterogeneous mixture. In Of Mice and Men, who said this quotation, You hadda, George, I swear you hadda. Come with me. 16. An airplane 30,000 feet above the ground begins descending at a rate of 2,000 feet per minute. Write an equation to model the situation. Find the altitude of the plane after 5 minutes The illustration shows volume levels of a liquid in a graduated cylinder before and after a mineral sample was placed into the graduated cylinder.liquid, only, liquid, and, mineral,According to this information, what was the volume of the mineral sample to the nearest milliliter?9 mL11 mL47 mL48 mL Find the slope of the line through the points (-9, 19) and (-13, 11). Draw the given figure's reflection image across line l. (look at the screenshot)A.B.C.D. 3) FUNDRAISING At a fundraising event, $10 is donated for every mile ran.Write a function to represent the situation.*A. O d=10mB. O d=m+10C. O d=10m + 10D. O dem10 I need help asap ill give BRAINLIEST when nicky tried to solve an equation using properties of equality, she ended up with the equation -3=-3. what equation mioght she have tried to solve? what is the solution of the equation? How would you write 0.7 repeated as a fraction C:/Users/Documents/resume.docx Where is the "resume" document located in this file structure? Can you write 10 2/3 as an improper fraction? Randall graphed the equation y=-2x+3 as follows:Did Randall correctly graph the equation?A. Yes he correctly graphed the equation B. No he graphed the line with a slope of 2 instead of -2 C. No, Randall graphed the line with a slope of -1/2 instead of -2 D. No, Randall graphed an x-intercept of (3,0) instead of y-intercept (0,3)