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
babunello [35]
3 years ago
13

Write a function that takes, as an argument, a list, identified by the variable aList. If the list only contains elements contai

ning digits (either as strings as non-negative integers), return the string formed by concatenating all of the elements in the list (see the example that follows).
Computers and Technology
1 answer:
Genrish500 [490]3 years ago
5 0

Answer:

The function is as follows:

def concList(aList):

   retList = ""

   for i in aList:

       if(str(i).isdigit()):

           retList+=str(i)

       else:

           retList = "Not digits"

           break;

   return retList

Explanation:

This defines the function

def concList(aList):

This initializes the return string to an empty string

   retList = ""

This iterates through aList

   for i in aList:

This converts each element of the list to an empty list and checks if the string is digit

       if(str(i).isdigit()):

If yes, the element is concatenated

           retList+=str(i)

If otherwise

       else:

The return string is set to "No digits"

           retList = "Not digits"

And the loop is exited

           break;

This returns the return string

   return retList

You might be interested in
The steps for creating a newsletter are to ____.
leonid [27]

Answer:

C) Plan, write, format, and proofread

Explanation:

You need a plan for any professional newspaper. Proofreading is also a vital step in the process. You can only format what you've already written, so it has to be C.

4 0
3 years ago
Your bank offers to lend you $114,400 at an 8.5% annual interest rate to start your new business. The terms require you to amort
wlad13 [49]

Answer: The amount of interest to be paid is $972

Explanation: This is gotten by firstly getting the amount of money to return per year without the interest which is $114400/10(years)= 11440

11440 is to be paid per year without interest. To get amount of interest is $11440*8.5/100 = $972 this is the amount of interest to be paid per year including in year 2.

Therefore, total amount of money together with interest to be paid each year and in year 2 = $11440+$972=12412.

3 0
3 years ago
If userA wants to send a secure message to userB using an asymmetric cryptographic algorithm, which key does userB use to decryp
ANTONII [103]

Answer:

userB will use his/her private key.

Explanation:

The steps involved in using asymmetric cryptographic algorithm are as follow:

1. Each user generates a pair of keys to be used for the encryption and decryption of messages.

2. Each user places one of the two keys in a public register or other accessible file. This is the public key. The companion key is kept private.

3. If UserA wishes to send a confidential message to UserB, UserA encrypts the message using UserB's public key.

4. When UserB receives the message, she decrypts it using her private key.

4 0
3 years ago
                                                       HELP PLEASE 
Marina CMI [18]
Your answer should be mode







5 0
3 years ago
Read 2 more answers
Which computer program did these companies use? fb, Microsoft, Google, LinkedIn​
Verdich [7]

Answer:most of the computer campanies use java script, phyton, c++ or c sharp .

Explanation:

5 0
4 years ago
Other questions:
  • Privileged instructions 1) generate an interrupt so they can execute before non-privileged instructions. 2) are valid only when
    5·1 answer
  • How long did it take Linkedln to reach 1 million users?
    5·2 answers
  • What does psychologist Edward Spector mean when he says “ We have an entire generation of guinea pigs in an experiment”?
    14·1 answer
  • An online service allows users to integrate their phonebook with their social media profiles and stores it on the cloud. The pho
    12·1 answer
  • Host Y sends the first TCP ACK message for the transaction?<br><br> a. true<br><br> b. false
    9·1 answer
  • sandra has houseplants sitting on her kitchen windowsill, where it receives a lot of sunlight . what will most likely be the pla
    9·2 answers
  • A group of developers for a startup company store their source code and binary files on a shared open-source repository platform
    14·1 answer
  • Explain how you think robotics plays a part in the subway driver's job.
    13·2 answers
  • Explain briely what this statement mean.<br>"A byte is equivalent to a character"<br>​
    15·1 answer
  • What are some other possible causes of an overheating laptop
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!