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
shusha [124]
3 years ago
14

You have a passage of text that needs to be typed out, but some of the letter keys on your keyboard are broken! You're given an

array letters representing the working letter keys, as well as a string text, and your task is to determine how many of the words from text can be typed using the broken keyboard. It is guaranteed that all of the non-letter keys are working (including all punctuation and special characters).
Computers and Technology
1 answer:
Romashka [77]3 years ago
6 0

Answer:

def broken_keyboard(text, characters):

   my_keys = [i.lower() for i in characters]

   count = 0

   words = list(text.split(" "))

   

   for word in words:

       word=word.lower()

       for char in word:

           if(char in my_keys or is not char.isalpha()):    

               count += 1  

   return count

Explanation:

The python function "broken_keyboard" returns the count of keys that can be used in the broken keyboard. It accepts two arguments, the strings of words and a list of character strings of letters that can be used in the keys.

You might be interested in
To make the most informed purchasing decision, you should:
musickatia [10]

Answer:

its either A or B but im leaning more towards B

Explanation:

6 0
2 years ago
What is one difference between a web page and a web application?
saul85 [17]

Answer:

A website is a group of globally accessible, interlinked web pages which have a single domain name. A web application is a software or program which is accessible using any web browser. Developing your website helps you in branding your business.

8 0
2 years ago
Although a tablet can connect to a cellular network, it cannot be used as a
Misha Larkins [42]

Answer:

A tablet can have mobile data such as MetroPCS. But the tablet can not make phone calls or texts.

7 0
3 years ago
Read 2 more answers
What is A wage paid based on the ability to sell a product or service is (a) _____.
Fantom [35]
The answer is commissioned
5 0
4 years ago
Sorting and filtering are two ways to blank data
madreJ [45]
It’s two ways to analyze data
6 0
3 years ago
Other questions:
  • The ___ is the primary storage device of a personal computer. hard drive RAM ROM compact disc
    6·1 answer
  • 7. The penalties for a first-time DUI charge include a fine of __________. A. up to $500 for a BAL of .08 to .15 B. $500-$1,000
    5·1 answer
  • Is it possible to make teleportation with a fusion device
    15·1 answer
  • When you take a multiple-choice test, you are relying on ________, a means of retrieving information out of your long-term memor
    8·1 answer
  • What are some examples of what can be changed through options available on the mini toolbar
    5·1 answer
  • What is the first priority when building or using vex robots
    10·2 answers
  • Explain what 10CLS program does and the write the output​
    13·1 answer
  • The function of anOR gate can best be described as a gate which provides an output of 1 only when
    10·1 answer
  • In the context of computer and network security, _____ means that a system must not allow the disclosing of information by anyon
    10·1 answer
  • True or False <br> Hebrew Bible and the Koran were first written in English.
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!