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
lubasha [3.4K]
2 years ago
7

Write a function called simulate_several_key_strikes. It should take one argument: an integer specifying the number of key strik

es to simulate. It should return a string containing that many characters, each one obtained from simulating a key strike by the monkey.
Computers and Technology
1 answer:
Furkat [3]2 years ago
7 0

Answer:

The solution code is written in Python 3

  1. import random
  2. import string
  3. def simulate_several_key_strikes(l):
  4.    char_set = string.ascii_lowercase
  5.    return ''.join(random.choice(char_set) for i in range(l))
  6. print (simulate_several_key_strikes(10))

Explanation:

The program is aimed to generate random characters and the number of characters generated is dependent on user input. Hence, we will need to import the random module (Line 1). We also import string module so that we can make use of its associated method to generate English letters (Line 2)

Next, we create the function simulate_several_key_strikes that takes one single parameter, l, as input. Within the function body, we use ascii_lowercase method to generate the lowercase letter set and assign it to char_set variable (Line 5). We use random.choice method to randomly pick one of the letter in char_set and join it with an empty string (Line 6). Please note there is a for-loop that will repeatedly generate l-number of character and eventually return it as output.

We test the function by passing 10 as input parameter and we shall get a sample output as follows:

xuiczuskoj

You might be interested in
Can i have information about skrillex hobbies
Bad White [126]

His real name was Sonny John Moore. He was born on January 15th, 1988. He has won a grammy award. His friends call him Shrillex.
7 0
2 years ago
Each object that is created from a class is called a(n) ____________ of the class.
gladu [14]
Instance





-------------------------
7 0
3 years ago
Read 2 more answers
A resistor bank is connected to a controller with conductor insulation rated 75 °C. The resistors are not used in conjunction wi
irina [24]

Explanation:

This means that it requires a disconnecting means for each motor, and it must be located in sight from the motor location and the driven machinery location.

Multiply the FLC of the largest motor by 125%.

Add up the FLCs of the other motors.

Multiply the continuous non-motor loads by 125%.

Add up all of the above to the total of the non-continuous loads.

3 0
3 years ago
Some smartphones use ______ text, where you press one key on the keyboard or keypad for each letter in a word, and software on t
Oksanka [162]

Answer:

The answer is "predictive".

Explanation:

The statement lacks some details, which can be answered by the choice of the question:

A. Presumptive .

B. suggestive .

C. interpretive.

D. predictive.

Predictive text is considered to be auto-correct text as well. It is an input technique, which allows people to type words onto a smartphone throughout the text field. It's focused on both the significance of the words and letters in the message, and certain choices were wrong, which can be defined as follows:

  • Option B and Option D both were wrong because it provides the synonyms of the words.
  • In option C It is wrong because it is a text version.

5 0
3 years ago
Tightly.
Radda [10]

Answer:

AG 6.

AG 1.

AG 3.

AG 4.

AG 7.

AG 5.

AG 2.

Explanation:

Chronology can be defined as an arrangement of data, items or documents in the order in which they occurred or happened (in time), from the earliest to the most recent or latest.

Simply stated, ordered events are organized in order of time and this process is known as chronology.

Generally, a chronology can be used as a filing process in various areas such as schools, hospitals, hotels, and business firms to help put data (informations) in order by time or date.

In Computer networking, a cable can be defined as a wired connector used for connecting and transmitting signals between two or more network devices such as CAT-5, CAT-6 and fiber optic cables. These cables which are either twisted or untwisted pair are to be crimped in order to make them eligible and appropriate for use in connecting network devices.

Furthermore, there are two (2) color codes used for the arrangement of the wires in a network cable based on the type of network connection;

I. For straight-through, host device to a router or switch;

Color code: white-orange, orange, white-green, blue, white-blue, green, white-brown, brown.

II. For cross-over, network device to a network device e.g router or router;

white-green, green, white-orange, blue, white-blue, orange,

5 0
2 years ago
Other questions:
  • I don’t know technically
    9·2 answers
  • When did the digital revolution begin
    10·1 answer
  • To move one screen to the left press ____.
    9·1 answer
  • List the names of 3 computer scientists
    6·2 answers
  • A customer has a computer for a home business, but wants to have another computer as a web server. What would be the best soluti
    11·2 answers
  • Create a paper of at least 1,800 words describing the situation you selected and explaining the logic that would support an arra
    15·1 answer
  • Chantelle wants to change the color scheme for her company's web app, and she needs to get the logos updated. What kind of devel
    8·1 answer
  • Describe accessibility in Windows 7 ​
    13·1 answer
  • Software that converts program written in other language into machine language​
    11·1 answer
  • Pam wants to make a note for other programmers in her Python code. How should the line of code for the note begin?
    7·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!