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
artcher [175]
3 years ago
5

Functions are ideal for use in menu-driven programs. When a user selects a menu item, the program can_______ the appropriate

Computers and Technology
1 answer:
Masteriza [31]3 years ago
4 0

Answer:

a. call

Explanation:

According to my research on function, I can say that based on the information provided within the question the program can call the appropriate function. A function is a piece of code that completes a single task when called upon. Calling is another way of just saying that your telling the function to run its code at that given moment.

I hope this answered your question. If you have any more questions feel free to ask away at Brainly.

You might be interested in
What is the output of this program?
dedylja [7]

Answer:

John Rambo is the output

6 0
3 years ago
The quality of an image is compromised when, what are stretched ?​
german

Answer:

pixels

Explanation:

3 0
3 years ago
WNOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOW
beks73 [17]

Answer:

yes.

Explanation:

7 0
2 years ago
Write a simple JavaScript function named makeFullName with two parameters named givenName and familyName. The function should re
Kazeer [188]

Answer:

Explanation:

Ji

3 0
3 years ago
The compare_strings function is supposed to compare just the alphanumeric content of two strings, ignoring upper vs lower case a
Korolek [52]

Answer:

There is a problem in the given code in the following statement:

Problem:

punctuation = r"[.?!,;:-']"

This produces the following error:

Error:

bad character range

Fix:

The hyphen - should be placed at the start or end of punctuation characters. Here the role of hyphen is to determine the range of characters. Another way is to escape the hyphen - using using backslash \ symbol.

So the above statement becomes:

punctuation = r"[-.?!,;:']"  

You can also do this:

punctuation = r"[.?!,;:'-]"  

You can also change this statement as:

punctuation = r"[.?!,;:\-']"

Explanation:

The complete program is as follows. I have added a print statement print('string1:',string1,'\nstring2:',string2) that prints the string1 and string2 followed by return string1 == string2  which either returns true or false. However you can omit this print('string1:',string1,'\nstring2:',string2) statement and the output will just display either true or false

import re  #to use regular expressions

def compare_strings(string1, string2):  #function compare_strings that takes two strings as argument and compares them

   string1 = string1.lower().strip()  # converts the string1 characters to lowercase using lower() method and removes trailing blanks

   string2 = string2.lower().strip()  # converts the string1 characters to lowercase using lower() method and removes trailing blanks

   punctuation = r"[-.?!,;:']"  #regular expression for punctuation characters

   string1 = re.sub(punctuation, r"", string1)  # specifies RE pattern i.e. punctuation in the 1st argument, new string r in 2nd argument, and a string to be handle i.e. string1 in the 3rd argument

   string2 = re.sub(punctuation, r"", string2)  # same as above statement but works on string2 as 3rd argument

   print('string1:',string1,'\nstring2:',string2)  #prints both the strings separated with a new line

   return string1 == string2  # compares strings and returns true if they matched else false

#function calls to test the working of the above function compare_strings

print(compare_strings("Have a Great Day!","Have a great day?")) # True

print(compare_strings("It's raining again.","its raining, again")) # True

print(compare_strings("Learn to count: 1, 2, 3.","Learn to count: one, two, three.")) # False

print(compare_strings("They found some body.","They found somebody.")) # False

The screenshot of the program along with its output is attached.

4 0
3 years ago
Other questions:
  • You have installed a device that has eight interfaces and does not forward broadcast packets. What kind of device did you instal
    6·2 answers
  • Which tag denotes the end of an element in HTML? A. / B. * C. > D. ) E. _
    8·1 answer
  • Your company received a call from a historical society inquiring about the possibility of networking a two-century-old building
    15·1 answer
  • When Hallmark designs its website so that a teenage girl can send a theme card to her boyfriend's cell phone, what is the primar
    6·1 answer
  • Florida Highway Safety and Motor Vehicles reported blank of traffic fatalities were alcohol-related in Florida in 2009.​
    8·1 answer
  • Which of the following is based on the visibility and location of an object’s features?
    15·1 answer
  • WHO WANTS TO PLAY AMONG US
    15·2 answers
  • Write a description of the photograph to someone who cannot see the photograph. Be sure to include the title of the photograph a
    5·1 answer
  • Information about www
    14·1 answer
  • Which display technology was developed by apple, produces vibrant colors, and supports viewing from all angles?
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!