Answer:
Explanation:
The following code is written in Python. It asks the user for an input. Then cleans the input using regex to remove all commas, whitespace, and apostrophes as well as making it all lowercase. Then it reverses the phrase and saves it to a variable called reverse. Finally, it compares the two versions of the phrase, if they are equal it prints out that it is a palindrome, otherwise it prints that it is not a palindrome. The test case output can be seen in the attached picture below.
import re
phrase = input("Enter word or phrase: ")
phrase = re.sub("[,'\s]", '', phrase).lower()
reverse = phrase[::-1]
if phrase == reverse:
print("This word/phrase is a palindrome")
else:
print("This word/phrase is NOT a palindrome")
B. A generated report will include all records that a query fetches.
Answer
Procedural programming, Object-oriented programming
Explanation
Procedural programming is a type of computer programming language that specifies a series of well structured steps and procedures within its development period of time. It contains a systematic order of statements, functions and commands to complete a computational task or program. It is centered on creating procedures. While object oriented programming is a programming language that is centered on creating objects rather that actions and data rather than logic.. It has four principles which are inheritance, polymorphism, abstraction and Encapsulation
Answer:
1. A high level algorithm for cooking a cheeseburger could be:
- Heat fry pan
- Cook one side of the hamburger
- Wait
- Turn hamburger upside down
- Put cheese over hamburger
- Wait
- Cut hamburger bread in half
- Put cooked hamburger inside bread
- End (eat)
2. A detailed algorithm for cooking a cheeseburger could be:
- Place fry pan over the stove heater
- Turn on heater (max temp)
- IF fry pan not hot: wait, else continue
- Place raw hamburger on fry pan
- IF hamburger not half cooked: Wait X time then go to line 5, else continue
- Turn hamburger upside down
- Put N slices of cheese over hamburger
- IF hamburger not fully cooked: Wait X time then go to line 8, else continue
- Turn off heater
- Cut hamburger bread in half horizontally
- Put cooked hamburger on one of the bread halves.
- Put second bread half on top of hamburger
- End (eat)
Explanation:
An algorithm is simply a list of steps to perform a defined action.
On 1, we described the most relevant steps to cook a simple cheeseburger.
Then on point 2, the same steps were taken and expanded with more detailed steps and conditions required to continue executing the following steps.
In computational terms, we used pseudo-code for the algorithm, since this is a list of actions not specific to any programming language.
Also we can say this is a structured programming example due to the sequential nature of the cooking process.
Answer:
Use the default-information originate command.
Explanation:
A network administrator customizes a fixed path on a channel's edge router for creating any last recourse gateway that is the router connecting to the online / ISP. So, they using the usual command source to customize the edge router to connect this path instantly using RIP.
That's why the following answer is correct according to the scenario.