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]
3 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]3 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
How does social media affect communication skills negatively?
AnnZ [28]
How social media affects communication negatively
The following are the ways in which social media affects communication negatively
1)Internet-the internet has made it easier to communicate too much use can result to addiction . Internet addiction make most of youths skip vital activities like homework,social activities among others. 
2)Text messages-The use of instant messaging has become popular especially among teens.Use of symbols such as emojis and abbreviated words has made many people to become too cusual on language use.
The use of fewer syllables and shorter words is likely to make teens leave out important aspects of verbal communication and may lead to misinterpretation of messages.
3)Dialogue-  Internet communication mostly takes place in the written form as opposed to the spoken form. Teens primarily communicate through textual posts,emails e.t.c all of which are in the written form.
Since written communication typically occurs in form of monologue, teens addicted to the internet may find it difficult to engage in dialogue a feature of verbal communication.For instance they may find it difficult to effectively use aspects of verbal communication such as tonal variation turn taking and speed.
<span>4)Informal language- </span>The use  of informal language is a salient feature of internet communication.This has a negative effect on teens mastery of formal language.
Internet language has features of informal language such as short turn taking, exclusion of auxiliary verbs and pronouns.
This could be due to the reason that teens put more emphasis on speed and efficiency at the expense of grammar.
5)Listening skills-
listening skills is an important aspect of verb communication and effective listening enhances communication.
Effective listening entails being information literate which is the ability to identify which information is needed when it is needed,where to find it, and effectively using it.
4 0
3 years ago
Give a real-world example of a selection control structure.
yuradex [85]

An example of selection structure is when a group of people wanted to know the exact  number of days through the use of a data set that has the daily high temperature which ranges from above 80 degrees, and as such, a programmer can use the if-end statement.

<h3>What is an if statement?</h3>

An IF statement is known to be a kind of statement that is executed due to the happening of a specific condition.

Note that IF statements must start with IF and end with the END.

Therefore, An example of selection structure is when a group of people wanted to know the exact  number of days through the use of a data set that has the daily high temperature which ranges from above 80 degrees, and as such, a programmer can use the if-end statement.

Learn more about  if-end statement from

brainly.com/question/18736215

#SPJ1

6 0
2 years ago
create a class rectangle with attributes length and width, each of which defaults to 1. provide methods that calculate the recta
Ludmilka [50]

Answer:

20.0.0.0

Explanation:

4 0
4 years ago
The operating system’s application programming interface (API) provides software developers with tools they use to build applica
lubasha [3.4K]

Answer:

True

Explanation:

Application Programming Interface (API) is a set of commands, functions, protocols, and objects that programmers can use to create software or interact with an external system. It provides developers with standard commands for performing common operations so they do not have to write the code from scratch.

Operating system APIs are typically integrated into the software development kit for the corresponding program. For example, Apple's Xcode IDE allows developers to drag and drop elements into an application's interface. It also provides a list of available functions and includes syntax highlighting for known elements and commands.   Operating system APIs have a robust set of features.

3 0
3 years ago
​Disabling the SSID broadcast of a network makes that network ____ to roaming devices.
marshall27 [118]

Answer:

The correct answer to the following question will be "Invisible".

Explanation:

  • SSID transmits the name to the surrounding devices by your router. The main function is to visibly and easily access your network. Usually your default router SSID will involve its brand name.
  • When a wireless device scans the WLAN area, it detects SSID to be connected to the router. However, SSID broadcast may also be disabled by default.
  • SSID Broadcast deactivation is one way of securing your wireless network and makes all the networks invisible.
8 0
3 years ago
Other questions:
  • You are interested in buying a laptop computer. Your list of considerations include the computer's speed in processing data, its
    15·1 answer
  • A force of 50n acts on a body of mass 5kg. calculate acceleration produced .​
    14·1 answer
  • We want to make a row of bricks that is goal inches long. We have a number of small bricks (1 inch each) and big bricks (5 inche
    5·1 answer
  • The screened subnet protects the DMZ systems and information from outside threats by providing a network with intermediate secur
    6·1 answer
  • Which of the following statements comparing debit cards to credit cards is TRUE?
    13·2 answers
  • An invisible path determining the way of travel from one place to another.
    10·1 answer
  • Key Categories: more libraries and thousands of functions
    5·1 answer
  • Free poi nts here you go
    5·1 answer
  • Whats the overall mood of the song Rags2Riches by rod wave
    14·1 answer
  • WILL GIVE BRAINLIEST IF DONE CORRECT
    15·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!