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
anzhelika [568]
3 years ago
7

Write a Python program that asks the user to enter a series of single-digit numbers with nothing separating them.

Computers and Technology
1 answer:
d1i1m1o1n [39]3 years ago
5 0

The Python 3 code for the program described in the question:

def sum_digits(str):

sum = 0

for c in str:

sum += int(c)

return sum

def main():

print("Enter series of single-digit numbers with no spaces: ")

str = input()

print("The sum of digits of the entered number is", sum_digits(str))

main()

You might be interested in
(Drag each tile to the correct box)While surfing online, Patricia first checks her email and reads the latest messages. She then
Marizza181 [45]

Answer:

When Patricia checks her email use:

POP3

TCP

IP

When Patricia brows a website and log in to post a comment use:

HTTP

TCP

IP

LDAP

Explanation:

Email protocol

Patricia starts to check her email, the email application uses the protocol POP3.

The protocol TCP makes a connection with the server and transport the data.

Patricia receives her emails with the protocol IP on her computer.

Website protocol

Patricia started to surf and the protocol HTTP makes a connection with the internet.

The protocol TCP makes a connection with the server and transport the data.

With the protocol IP, she receives the website data.

With the protocol LDAP, Patricia makes a login to post the comment.

6 0
3 years ago
Attackers need a certain amount of information before launching their attack. One common place to find information is to go thro
VARVARA [1.3K]

Answer:

The answer is Letter D. Dumpster diving.

Explanation:

This process of going through a target's trash is known in the community as dumpster diving. This attack is a technique used to retrieve information that could be used to carry out an attack on a computer network.

It is important to inform that the dumpster diving it is not limited to searching through  the trash for obvious treasures like acess codes or passwords written down on sticky notes.

8 0
2 years ago
What is the other name of iterative staatement ​
Mademuasel [1]

Answer:

An loop statement

Explanation:

An iteration statement, loop, repeatedly executes a statement, know as a loop body,until the controlling expression is false

8 0
2 years ago
Which of the following is true of the Internet as a medium for branding? a) The Internet is more effective as a media for brandi
alexira [117]

Answer:

The answer to this question is option "d".

Explanation:

Internet branding describes as a brand management system that allows us to use the Internet as a tool for promoting the products. In other words, we can say that advertising the product on the Internet is known as Digital marketing. and other options are not correct that can be defined as:

  • In option a, It does not provide one-directional communication flow.
  • The b, c, and e options are not correct, because the internet is an effective medium for branding and it also provides services for branding.  

3 0
2 years ago
In a C++ program, one and two are double variables and input values are 10.5 and 30.6. After the statement cin >> one >
SSSSS [86.1K]

Answer:

variable one stores 10.5 and two stores 30.6

Explanation:

In c++ language, the cout keyword is used to write to the standard output. The input from the user is taken by using the cin keyword.

For the input from the user, a variable need is declared first.

datatype variable_name;

The input can be taken one at a time as shown.

cin >> variable_name;

The input for more than one variable can be taken in a single line as given by the syntax below.

1. First, two variables are declared.

datatype variable_name1, variable_name2;

2. Both input is taken simultaneously as shown.

cin >> variable_name1, variable_name2;

For the given scenario, two double variables are declared as below.

double one, two;

The question mentions input values for the two double variables as 10.5 and 30.6.

3. The given scenario takes both the values as input at the same time, in a single line as shown below.

cin >> one >> two;

4. After this statement, both the values entered by the user are accepted.

The values should be separated by space.

First value is stored in the variable one.

Second value is stored in the variable two.

5. The user enters the values as follows.

10.5 30.6

6. The value 10.5 is stored in variable one.

7. The value 30.6 is stored in variable two.

The c++ program to implement the above is given below.

#include <iostream>

using namespace std;

int main() {

   double one, two;      

   cout << " Enter two decimal values " << endl;

   cin >> one >> two;

   cout << " The input values are " << endl;

   cout << " one : " << one << " \t " << " two : " << two << endl;

   return 0;

}

OUTPUT

Enter two decimal values  

10.5 30.6

The input values are  

one : 10    two : 530.6

6 0
3 years ago
Other questions:
  • Create and apply a css class named bigblue, which selects a large, blue-colored font.
    11·1 answer
  • The n modifier after the tilde forces the index variable to expand only to the ______
    15·1 answer
  • Ben buys an Olympus E-PL2 from Sony which starts malfunctioning. When he opts for an exchange, the customer representative says
    11·1 answer
  • In report design view, you can use commands on the align button of the _____ tab.​
    11·1 answer
  • ___________________ are aggregated collections of memory and cpu resources that can be shared among groups of virtual machines o
    11·1 answer
  • What are some options available in the Spelling and Grammar Checker? Check all that apply. Change and Change All Redo and Repeat
    15·2 answers
  • Write a program that prompts the user to enter the area of the flat cardboard. The program then outputs the length and width of
    15·1 answer
  • A good information that contains the facts necessary for decision makers to solve a problem is characterized by the __________.
    15·2 answers
  • (40 PTS) Be specific
    12·1 answer
  • Hellpppppppppppppppp
    13·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!