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]
2 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]2 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
• R7.9 Write enhanced for loops for the following tasks.
alexdok [17]

Answer:

a is the correct answer

Explanation:

correct me if I'm wrong hope it's help thanks

3 0
2 years ago
Assume that two classes 'Temperature' and 'Sensor' have been defined. 'Temperature' has a constructor that accepts a double para
Black_prince [1.1K]

Answer:

The answer for the following question is given as:

public static Temperature create(Sensor ob)

{

return new Temperature(ob.getReading());

}

Explanation:

In this we have create a static method of  Temperature class which accept a 'Sensor' object and  return the new 'Temperature' object that calls the 'getReading()' function This function returns the sensor's current reading.

7 0
3 years ago
For the past five days, the Howard family has traveled these miles: 389;126;419;93; and 394. Find the range and how. Show all yo
Fofino [41]
The answer is 326.

Range is found by subtracting the smallest number in the data set from the largest number.

Highest number: 419
Lowest number: 93

419-93
=326

(Next time make sure to post this under the Mathematics section.)
5 0
3 years ago
Which best describes a VPN?
aleksandr82 [10.1K]

A private connection through a private network

8 0
2 years ago
Read 2 more answers
Meenakshi has created a presentation of six slides. The slides have the same background, but s wants to change the background of
sdas [7]
Ans:- Using Background Styles button present in Background group on the Design tab.
5 0
2 years ago
Other questions:
  • A school librarian has been asked to identify inappropriate Internet usage. Which students would most likely be reported to the
    5·2 answers
  • You can type notes of what to cover when presenting the show in the______ pane.
    15·1 answer
  • Unlike artistic drawings, which communicate self-expression and
    15·1 answer
  • What is it called when you make a reference in the text of a document alerting the reader that you are using information from an
    10·1 answer
  • In which job role would a course in 3D modeling help with professional career prospects?
    9·2 answers
  • I prefer a job where I am praise for good performance or I am accountable for results
    13·1 answer
  • Complete the sentence.<br> A ___ number is composed of only zeros and ones.
    8·1 answer
  • When a computer is suffering from a virus, you can use a compiler to help remove the virus. True or false?
    13·1 answer
  • Describe an example of a very poorly implemented database that you've encountered (or read about) that illustrates the potential
    12·1 answer
  • How many questions do you have to answer before you can use direct messages on Brainly?
    13·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!