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
natta225 [31]
3 years ago
8

Write the function lettersOnly(s) that takes in a string called s, and returns a string containing only the alphabetic character

s of s.
Computers and Technology
1 answer:
Phantasy [73]3 years ago
4 0

Answer:

The program to this question as follows:

Program:

def lettersOnly(s): #defining method lettersOnly

   val="" #defining string variable that return value

   for i in s: #defining loop to calculate value

       if(i.isalpha()): #check condition that value is string

           val=val+ i #add value

   return val #return value

print(lettersOnly("data3base_ro1c3k5s")) #call method and print value

Output:

databaserocks

Explanation:

In the above python code, a method lettersOnly is declared that accepts a string variable  "s" in its parameter. Inside the method, a string variable "val", and loop is declared, in which the "val" variable holds method return value.

  • In the loop and if block is used that uses "isalpha" string method, which checks the check alphabetic character in the given value. if this is true it will calculate all value in "val" variable and return its value.    
  • At the last, the print method is used, which calls the lettersOnly method and prints its return value.
You might be interested in
You need to pay an Internet Service Provider (ISP) for services rendered. Which payment technology would you use?
-Dominant- [34]

Answer:

D. Electronic Funds Transfer (EFT)

Explanation:

e-commerce is a short for electronic commerce and it can be defined as a marketing strategy that deals with meeting the needs of consumers, by selling products or services to the consumers over the internet.

This ultimately implies that, e-commerce is strictly based on the buying and selling of goods or services electronically, over the internet or through a digital platform. Also, the payment for such goods or services are typically done over the internet such as online payment services.

A payment gateway can be defined as a merchant service technology used for the capturing, acceptance and transfer of digital payment from the bank account of a customer (buyer) to the bank account of the merchant (seller). Thus, payment gateway typically involves the use of credit or debit card for the payment of goods purchased or services provided.

In this scenario, you need to pay an Internet Service Provider (ISP) for services rendered. Thus, the payment technology which you would use is Electronic Funds Transfer (EFT).

3 0
2 years ago
You discover that the lecturers will be using the laptops for online and video lecturing, and you see the need to upgrade the RA
Step2247 [10]

The RAM of G.Skill Trident Z Neo 3600 will be highly recommended for online and video lecturing.

<h3>What is RAM?</h3>

This is referred to random access memory and store information which can be retrieved quickly.

The RAM of G.Skill Trident Z Neo 3600 is 32GB which ensures the speed of the processor is fast.

Read more about RAM here brainly.com/question/13748829

#SPJ9

7 0
2 years ago
Read 2 more answers
In a c program, if you see a variable in main declared: float farray[20]; describe what farray is
Bas_tet [7]
An array of floats that can hold up to 20.
3 0
3 years ago
Which programming language uses objects?<br> O C++<br> O ALGOL<br> O Pascal<br> O BASIC
AfilCa [17]

Answer:

Both C++ and Pascal uses objects.

5 0
3 years ago
Read 2 more answers
Which statement best justifies the use of a high-speed cache in a CPU?
crimeas [40]

Cache memory is a high-speed memory that stores the instructions and data that have been frequently accessed.  It decreases the time it takes to decode the instructions stored in the instruction pipeline.

A.  It decreases the time it takes to decode instructions stored in the instruction pipeline.

<u>Explanation:</u>

Whenever an instruction is invoked or some data is accessed, the CPU looks for it in the cache memory before accessing the main memory.

If the content is found in the cache memory, it accessed from there and then and hence the access time and decode time is reduced as there were no main memory lockups.

6 0
3 years ago
Other questions:
  • A(n) ___ operating system is a very fast, relatively small os. it is designed to respond to hardware and program requests almost
    6·1 answer
  • Storing a value in a variable<br> Exponent<br> Variable<br> Assignment<br> Operator
    13·1 answer
  • Scavenging is a form of fraud in which the perpetrator uses a computer program to search for key terms in a database and then st
    14·1 answer
  • Summarizes statistical data ?
    11·1 answer
  • Jesse is trying to find a computer file. he types the name of the file into the computer search bar. the computer is most likely
    5·2 answers
  • Exactly how thin is the air in outer space?
    10·1 answer
  • Give an example of a situation in which a compromise of Confidentiality leads to compromise in Integrity.Situation where confide
    8·1 answer
  • 1. Create an optimized function "print s(n,s)" that prints the given argument s (representing a string) k times. k represents th
    7·1 answer
  • Mario kart is mercedes lol
    13·2 answers
  • Which open-sourced packet capture tool uses linux and mac os x operating systems?
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!