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
Sveta_85 [38]
3 years ago
7

Accepting a sequence of arbitrary length 1. Write a function that adds the given numbers together and prints the sum. 2. Then ad

d any other numbers that were sent to the arbitrary number of arguments and print the results HINT: * is needed for arbitrary number of arguments
Computers and Technology
1 answer:
lilavasa [31]3 years ago
5 0

Answer:

def _main_():

print('Are you Sure you want to quit ? y/n')

#take user input

user_input=input()

if user_input=='n':

while(user_input!='q'):

#Provide option on the User Screen

print('Welcome to the fitness center. What would you like to do?')

print('[1] Enter 1 to take a bike ride.')

print("[2] Enter 2 to go for a run.")

print("[3] Enter 3 to climb a mountain.")

print("[4] Enter 4 to go swimming.")

print('[q] Enter q to Quit!.')

#Simple if Else

choice=input("\nWhat would you like to do? ")

if choice=='1':

print("\n Here's your bike. Grab a helment from the rack. Have fun!\n")

elif choice == '2':

print("\n Here are some sneakers. Run fast!\n")

elif choice == '3':

print("\n Here's a map. Can you leave a trip plan for us?\n")

elif choice == '4':

print("\n Don't pee in the pool. Good Luck!\n")

elif choice == 'q':

print("\n Thanks for playing. See you later.\n")

else:

print("\n I don't understand that choice, please try again. \n")

user_input=choice

#Function for printing favorite color

def name(name,color):

print(name+"'"+' '+'favorite color is '+color)

def phone(brand,model):

print(brand+' '+model)

def arbitary(*argv):

li=[]

for i in argv:

li.append(i)

print(sum(li))

name('abhi','blue')

name('sunny','black')

name('rahul','silver')

phone('iphone','8 plus')

phone('samsung','Note 3')

phone('xiomai','8')

arbitary(1,2,3)

arbitary(3,5)

Explanation:

The program function will perform these functions;

Take in a sequence of arbitrary length.

Write a function that adds the given numbers together and prints the sum.

Then add any other numbers that were sent to the arbitrary number of arguments and print the results

You might be interested in
Which company provides the Loki Wi-Fi mapping service?
Vitek1552 [10]
Mapping is provided By Bing
3 0
3 years ago
The __________ operator increases the value of the variable by 1 after the original value is used in the expression in which the
Irina18 [472]

Answer:

postincrement.

Explanation:

In Computer programming, a variable can be defined as a placeholder or container for holding a piece of information that can be modified or edited.

Basically, variable stores information which is passed from the location of the method call directly to the method that is called by the program.

For example, they can serve as a model for a function; when used as an input, such as for passing a value to a function and when used as an output, such as for retrieving a value from the same function. Therefore, when you create variables in a function, you can can set the values for their parameters.

The postincrement operator increases the value of the variable by 1 after the original value is used in the expression in which the variable appears.

7 0
3 years ago
I need it in code please (python)
Marianna [84]
Python coded) pythooonn
8 0
3 years ago
Read 2 more answers
What was bill gates first operating system he created?
vagabundo [1.1K]
Microsoft windows was his first

3 0
3 years ago
__________, a level beyond vulnerability testing, is a set of security tests and evaluations that simulate attacks by a maliciou
True [87]

According to security evaluation, <u>Penetration testing</u> is a level beyond vulnerability testing, a set of security tests and evaluations that simulate attacks by a malicious external source (hacker).

Penetration testing is often considered or described as ethical hacking. It involves the process of securing a firm or organization's cyber defenses.

The process of penetration testing or security testing includes assessing for exploitable vulnerabilities in networks, web apps, and user security.

Hence, in this case, it is concluded that the correct answer is <u>Penetration testing.</u>

Learn more about <u>penetration testing</u> here: brainly.com/question/13137421

6 0
3 years ago
Other questions:
  • What is Least effective at preventing a computer virus
    10·1 answer
  • Somebody who is good at this stuff, please halp meh ;-;
    6·1 answer
  • Reading for subject content follows the same steps as reading for entertainment. True or false.
    10·2 answers
  • Different video files and ______ can cause compatibility issues to arise between computer systems.
    8·1 answer
  • print out the last even number from an array of integers, if there is no even number, then print out a sentence indicating so.
    5·1 answer
  • What is an example of CT SO?
    9·1 answer
  • Jared recently sent an email to all the members of his department asking them for their opinions about where the department shou
    11·1 answer
  • g How safe is to have a LinkedIn account where you have published all the important information about yourself
    13·2 answers
  • What is the output by the code system.out.print(8-4+2);
    13·1 answer
  • . When you ____________________ a word, you can use a single line, a double lines, a dotted line, or even a wavy line!
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!