Describe and compare imperative (C), functional (SML) and logic (Prolog) programming paradigms.

Answers

Answer 1

Answer:

Answered below

Explanation:

Imperative programming paradigm is a paradigm in which the programmer tells the machine how to change its state. It is divided into procedural programming, where programs are grouped as procedures, and object-oriented, where programs are grouped together with the properties they operate on.

Imperative paradigm is efficient, familiar and popular compared to others.

Functional programming paradigm implements all instructions as functions, in a mathematical sense. They take on an argument and return a single solution. The advantage of this, compared to other paradigms, is its abstraction and independence.

Logical programming, like functional programming, incorporates a declarative approach to problem solving. All known facts are first established before queries are made. Advantage of this paradigm is that programming steps are kept to a minimum.


Related Questions

Write a program that asks the user to enter in a username and then examines that username to make sure it complies with the rules above. Here's a sample running of the program - note that you want to keep prompting the user until they supply you with a valid username:

Answers

user_in = input ("Please enter your username: " )

if user_in in "0123456789":

print ("Username cannot contain numbers")

elif user_in in "?":

print ("Username cannot continue special character")

else:

print (" Welcome to your ghetto, {0}! ".format(user_in))

notes on secondary memory​

Answers

Answer:

non-volatile and persistent in nature

Gary frequently types his class assignment. His ring automatically types the letter O. What is Gary using when he types?

A.Keyboard shortcut
B.Home row
C.Muscle memory
D.Windows logo

Answers

the answer would be C
The answer is C. Muscle memory


Hope this answers your question

Which branch structure does a program use to output "Yes" if a variable's value is positive, or "No" otherwise?

Answers

Answer:

Selection control structure

Explanation:

This is often referred to as if-conditional statement;

This condition tests for a condition and performs a sequence of operation depending on the result of the condition;

Take for instance, the following program written in python

x = int(input("enter any number: "))

if x < 0:

  print("Yes")

else

  print("No")

The above checks if the input number is less than 0,

If the condition is true, it prints Yes

If otherwise, it prints No

Develop a simple game that teaches kindergartners how to add single-digit numbers. Your function game() will take an integer n as input and then ask n single-digit addition questions. The numbers to be added should be chosen randomly from the range [0, 9] (i.e.,0 to 9 inclusive). The user will enter the answer when prompted. Your function should print 'Correct' for correct answers and 'Incorrect' for incorrect answers. After n questions, your function should print the number of correct answers.

Answers

Answer:

2 correct answer out of 3

10.7 LAB: Fat-burning heart rate Write a program that calculates an adult's fat-burning heart rate, which is 70% of 220 minus the person's age. Complete fat_burning_heart_rate() to

Answers

Answer:

I've written in python

Explanation:

age = int(input("Enter the person's age: ")

def fat_burning_heart_rate(x):

rate =( 70/100 * 220 ) - age

print(fat_burning_heart_rate(age))

Kith Smallest Number Real World Example

Hello!

What are five reasons why one would need to find the kth smallest number of an array? Also known as the Selection Problem.

I'm looking for 5 real world examples.

Will definitely give brainliest!


The Selection Problem is a problem where we must find the kth order statistic of a given array. As in, we must find the largest kth number. For example, if our array is [1, 3, 4, 5, 9], and k = 3, we would want to find the 3rd largest number, so our algorithm should output the number 4.

Answers

Answer:

A new coffee shop is being built. Its location is the reflection of the arcade's coordinates across

the y-axis. Which procedure will find the correct distance between the arcade and the new coffee shop

Create a python program that display this
Factorial Calculator
Enter a positive integer: 5
5! = 1 x 2 x 3 x 4 x 5
The factorial of 5 is: 120
Enter a positive integer: 4
4! = 1 x 2 x 5 x 4
.
The factorial of 4 is: 24
Enter a positive integer: -5
Invalid input! Program stopped!​

Answers

Answer:

vxxgxfufjdfhgffghgfghgffh

what makes''emerging technologies'' happen and what impact will they have on individuals,society,and environment

Answers

Answer:

Please refer to the below for answer.

Explanation:

Emerging technology is a term given to the development of new technologies or improvement on existing technologies that are expected to be available in the nearest future.

Examples of emerging technologies includes but not limited to block chain, internet of things, robotics, cognitive science, artificial intelligence (AI) etc.

One of the reasons that makes emerging technology happen is the quest to improving on existing knowledge. People want to further advance their knowledge in terms of coming up with newest technologies that would make task faster and better and also address human issues. For instance, manufacturing companies make use of robotics,design, construction, and machines(robots) that perform simple repetitive tasks which ordinarily should be done by humans.

Other reasons that makes emerging technology happens are economic benefit, consumer demand and human needs, social betterment, the global community and response to social problems.

Impact that emerging technology will have on;

• Individuals. The positive effect of emerging technology is that it will create more free time for individuals in a family. Individuals can now stay connected, capture memories, access information through internet of things.

• Society. Emerging technology will enable people to have access to modern day health care services that would prevent, operate, train and improving medical conditions of people in the society.

• Environment. Before now, there have been global complains on pollution especially on vehicles and emission from industries. However, emerging technology will be addressing this negative impact of pollution from vehicles as cars that are currently being produced does not use petrol which causes pollution.

what makes ''emerging technologies'' happen is the necessity for it, the need for it in the society.

The impact they will have on individuals ,society,and environment is that it will improve areas of life such as communication, Transportation, Agriculture.

What is Emerging technologies?

Emerging technologies can be regarded as the technologies in which their development as will as practical applications are not yet realized.

Learn more about Emerging technologies at:

https://brainly.com/question/25110079

1110011*110011 binary multiplication

Answers

122113420121

Explanation:

Answer:

110110101001

Explanation:

You have to multiply them normally and then add then in a binary manner..

Remember these are binary numbers ( 1+1=0,

1+0=1, 0+0=0)

Give five types of hardware resource and five types of data or software resource that can usefully be shared. Give examples of their sharing as it occurs in practice in distributed systems.

Answers

Answer:

Answered below

Explanation:

Hardware resources that can be usefully shared and also examples of their sharing include;

A) CPU servers, which carry out computations for clients.

B) Network capacity transmission of data or packet transmission is done using the same circuit, meaning many communication channels share the same circuit.

C) Screen networks windows systems which enable processes in remote computers to update the contents of their local server.

D) Memory cache server.

E) Disk file server, virtual disk server.

Softwares include;

A) Web-page web servers which allow client programs to have read-only access to page contents.

B) Database whose contents can be usefully shared.

C) File servers enable multiple users access to files .

D) Objects can be shared in distributed systems example shared ticket booking, whiteboard etc.

E) Exclusive lock which enables the coordination of accessing a special resource.

What is resource Management in Wireless Communication ? Explain its Advantages?

Answers

Answer:

Resource management is the system level transmission cellular networks and wireless communication.

Explanation:

Wireless communication is the process to continue to the address for faster response time,to the resource management.

Transmission is the provided by that more utilization and wireless resources available,and to discovered data.

Wireless communication system to demand the larger bandwidth and transmission using development to the system.

Wireless communication resources management the larger bandwidth and reliable transmission consumed all the system layer.

Resource management techniques tool are used in a preliminary concepts or mathematical tools,and average limited power battery.

Resource management are they necessary mathematical and fundamental tools are used in wireless communication.

Wireless communication in the provide that wireless industry in a wireless communication.

_________ enables customers to combine basic computing services,such as number crunching and data storage,to build highly adaptable computer systems.A) IaaSB) EAP peerC) CPD) SaaS

Answers

Answer:

The correct answer to the question is option A (IaaS)

Explanation:

IaaS (Infrastructure as a Service) can be used for data storage, backup, recovery, web hosting, and various other uses as it is cost-effective, and it also has secured data centers. It is a service delivery method by a provider for cloud computing as it enables customers to be offered the service the possibility to combine basic computing services to build and direct access to safe servers where networking can also be done. These services rendered by the providers allow users to install operating systems thereby making it possible to build highly adaptable computer systems.

SaaS (Software as a Service): Here, the service provider bears the responsibility of how the app will work as what the users do is to access the applications from running on cloud infrastructure without having to install the application on the computer.

The cloud provider (CP) as the name suggests is anybody or group of persons that provide services for operations within the cloud.

3. Coaxial/telephone cable sends
during the data transmission
signal

Answers

Answer:

high frequency signal.

Bharath has made a table of content for his document in Open Office, in which he wants to make few changes, but he is unable to make the changes. Give reason. Explain how he can make the necessary changes

Answers

Answer:

H cannot update it because it is probably protected.

If you cannot click in the table of contents, it is probably because it is protected. To disable this protection, choose Tools > Options > OpenOffice.org Writer > Formatting Aids, and then select Enable in the Cursor in protected areas section. If you wish to edit the table of contents without enabling the cursor, you can access it from the Navigator.

Explanation:

. To update a table of contents when changes are made to the document:

Right-click anywhere in the TOC.

From the pop-up menu, choose Update Index/Table. Writer updates the table of contents to reflect the changes in the document.

You can also update the index from the Navigator by right-clicking on Indexes > Table of Contents1 and choosing Index > Update from the pop-up menu.

b. Does “refactoring” mean that you modify the entire design iteratively? If not, what does it mean?

Answers

Explanation:

Refactoring consists of improving the internal structure of an existing program's source code, while preserving its external behavior. 

Arrays are commonly used to store data items. Arrays can be managed in ways that fill, iterate over, add to, and delete items from the array. Why is it useful to store multiple pieces of information?

Answers

Answer:

mark me brainlist

Explanation:

Agile Software Development is based on Select one: a. Iterative Development b. Both Incremental and Iterative Development c. Incremental Development d. Linear Development

Answers

Answer:

b. Both incremental and iterative development.

Explanation:

Agile software development is based on both incremental and iterative development. It is an iterative method to software delivery in which at the start of a project, software are built incrementally rather than completing and delivering them at once as they near completion.

Incremental development means that various components of the system are developed at different rates and are joined together upon confirmation of completion, while Iterative development means that the team intends to check again components that makes the system with a view to revising and improving on them for optimal performance.

Agile as an approach to software development lay emphasis on incremental delivery(developing system parts at different time), team work, continuous planning and learning, hence encourages rapid and flexible response to change.

why is computer called and information processing machine​

Answers

Answer:

why is computer called information processing machine? Since, the computer accepts raw data as input and converts into information by means of data processing, it is called information processing machine (IPM).

Explanation:

Performing binary search on an unsorted list will always return the correct answer in O(n) time where n is the length of the list.
a) true
b) false

Answers

Answer:

B. False

Explanation:

Binary search does not work in an unsorted list, therefore it will not return the correct answer in 0(n) time.

For an unsorted list, linear search is the better way of searching for algorithms.

For a binary search, it goes through a sorted list to locate a desired element. It repeats its processes until it picks the correct element it is looking for.

Secure email technique that provides confidentiality, along with authentication, integrity, and non-repudiation. It uses a centralized trust model where users get a certificate from a trusted CA.

a. True
b. False

Answers

Answer:

a

Explanation:

just put a

Write a recursive function stringReverse that takes a string and a starting subscript as arguments, prints the string backward and returns nothing. The function should stop processing and return when the end of the string is encountered. Note that like an array, the square brackets ( [ ] ) operator can be used to iterate through the characters in a string.

Answers

Answer:

void stringReverse(string s, int start){

   if(s[start]=='\0'){

       return;

   }

   else{

       stringReverse(s.substr(1,s.length()-1),start+1);

       cout<<s[start];

   }

}

Explanation:

Giving BRANLIEST IFF CORRECT What is the label called for each column in a database? Field File Record Title

Answers

Answer:

Title

Explanation:

the others describe other items in a database

Answer:

Title

Explanation: idek but I got it correct on a quiz

Tuesday
write the
correct
answer
Text can be celected using
2 A mouse
device of
is
ch
3 Scrolls bars are
buttons which assist
upwards downwards
sideways to
skole
Text can be selectedusing

Answers

Answer:

number 2 is the awnser(the mouse)

You have a Nano Server named Nano1. Which cmdlet should you use to identify whether the DNS Server role is installed on Nano1

Answers

Answer:

The correct solution will be "Get-Package".

Explanation:

The accreditation property defines a domain as well as client initials with computer authorizations for executing commands. Mostly on the virtual device, the argument ScriptBlock executes the Get-Package cmdlet. This order obtains from some kind of special introductory commercial software downloaded on either the user's computer.

Write a method named coinFlip that accepts as its parameter a string holding a file name, opens that file and reads its contents as a sequence of whitespace-separated tokens. Assume that the input file data represents results of sets of coin flips. A coin flip is either the letter H or T, or the word Heads or Tails, in either upper or lower case, separated by at least one space. You should read the sequence of coin flips and output to the console the number of heads and the percentage of heads in that line, rounded to the nearest whole number. If this percentage is 50% or greater, you should print a "You win!" message; otherwise, print "You lose!". For example, consider the following input file: H T H H T Tails taIlS tAILs TailS heads HEAds hEadS For the input above, your method should produce the following output: 6 heads (50%) You win!

Answers

Answer:

Here is the JAVA program:

import java.io.*;

import java.util.*;

public class Main {

public static void main(String[] args) throws FileNotFoundException{ //the start of main() function body, it throws an exception that indicates a failed  attempt to open the file

Scanner input = new Scanner(new File("file.txt")); //creates a Scanner object and a File object to open and scan through the file.txt    

coinFlip(input);    } //calls coinFlip method

public static void coinFlip(Scanner input) { //coinFlip method that accepts as its parameter a string input holding a file name

while(input.hasNextLine()) { //iterates through the input file checking if there is another line in the input file

Scanner scan = new Scanner(input.nextLine()); //creates a Scanner object

int head = 0; // stores count of number of heads

int count = 0; //stores count of  total number of tokens

while(scan.hasNext()) { //iterates through the sequence checking if there is another sequence in the input file

String token= scan.next(); // checks and returns the next token

if (token.equalsIgnoreCase("H")||token.equalsIgnoreCase("Heads")) { //compares H or Heads with the tokens in file ignoring lower case and upper case differences

           head++;                } //if a token i.e. any form of heads in file matches with the H or Heads then add 1 to the number of heads

           count++;            } //increment to 1 to compute total number of counts

double result = Percentage(head, count); //calls Percentage method passing number of heads and total counts to compute the percentage of heads

System.out.println(head + " heads " + "(" + result +"%)"); // prints the number of heads

if(result >= 50.00) { //if the percentage is greater or equal to 50

System.out.println("You win!");} //displays this message if above if condition is true

else //if the percentage is less than 50

{System.out.println("You lose!");}  }    } //displays this message if above if condition is false

public static double Percentage(int h, int total) { //method to compute the percentage of heads

double p = (double)h/total* 100; // divide number of heads with the total count and multiply the result by 100 to compute percentage

return p;    } } //returns result

Explanation:

The program is well explained in the comments mentioned with each line of the above code. I will explain how the method coinFlip  works.

Method coinFlip accepts a string holding a file name as its parameter. It opens that file and reads its contents as a sequence of tokens. Then it reads and scans through each token and the if condition statement:

if (token.equalsIgnoreCase("H")||token.equalsIgnoreCase("Heads"))

checks if the each token in the sequence stored in the file is equal to the H or Heads regardless of the case of the token. For example if the first token in the sequence is H then this if condition evaluates to true. Then the head++ statement increments the count of head by 1. After scanning each token in the sequence the variable count is also increased to 1.

If the token of the sequence is HeAds then this if condition evaluates to true because the lower or upper case difference is ignored due to equalsIgnoreCase method. Each time a head is found in the sequence the variable head is incremented to 1.

However if the token in the sequence is Tails then this if condition evaluates to false. Then the value of head variable is not incremented to 1. Next the count variable is incremented to 1 because this variable value is always incremented to 1 each time a token is scanned because count returns the total number of tokens and head returns total number of heads in the tokens.

Percentage method is used to return the percentage of the number of heads in the sequence. It takes head and count as parameters (h and total). Computes the percentage by this formula h/total* 100. If the result of this is greater than or equal to 50 then the message  You win is displayed otherwise message You lose! is displayed in output.

collection of any data can be database
False
True​

Answers

Answer:

True is the answer

have a great day

Giving Brainliest IFFF CORRECT

Jonathan needs to create a chart that shows the change in weight he can lift in weightlifting class. Which chart or graph should he use?

Bar graph

Column chart

Line graph

Pie chart

Answers

Answer:

line graph

Explanation:

the change in weight is linear

Answer:

Line Graph

Explanation:

Linear Weight change

Diana is working on an Access file. She added a rectangle to the title of her form and would like to change the color of the rectangle border. To complete this task, Diana goes into Design view, clicks on Property Sheet, and then clicks on the Other tab. She is unable to find the Border Color option to make the change. What error did Diana make? A.She should have used Format view instead of Design view.
B.She should have clicked Controls before clicking Property Sheet.
C.She should have clicked on the Format tab after clicking Property Sheet.
D.She should have looked for the Border Width option instead of the Border Color option.

Answers

Answer:

A

Explanation:

she should have used format view instead of design view

2. Which property is used for hiding text of the textbox?
a) Password Char b) Text Char c) Char Password d) Pass Char

Answers

Answer:

password char

Explanation:

The password char property allows the text being written in the textbox to be hidden in the form of dots or stars. As such the user entering the password is secure, as no one nearby can know the password by watching the texts.

Other Questions
Which two of the following are ways in which Englands monarchy changed after the Glorious Revolution? A) The idea of divine right ended in England. B)Women were not allowed to reign as monarchs. C)Parliament became the supreme legal body. D)The House of Lords was abolished. E)Monarchs faced limits on the length of their reign. Fremont Enterprises has an expected return of and Laurelhurst News has an expected return of . If you put of your portfolio in Laurelhurst and in Fremont, what is the expected return of your portfolio? 51: Y = 3: 5 value of Y An institution through which leader exercise power to make and enforce laws Define NetworkingExplain types of NetworkExplain topologies In markets where the government imposes an excise tax on unit sales, it also has a tendency to dabble with restrictions on advertising (for example, cigarettes and hard liquor). Do potential (or actual) restrictions on advertising in these markets serve the interest of a government that is interested in maximizing its tax revenue from the sale of these products? Explain your answer 8 kids bought a 3 cakes. How many equal parts will need to divide it so that everyone can have it. Easy one! Mother wants to divide $36 between her daughters Ava and Charlotte in the ratio of their ages. If Ava is 15 years old and Charlotte is 12 years old, find how much Ava and Charlotte will get. Which correctly describes a cause-and-effect relationship in this excerpt? Cause: People had to walk a half mile to catch the bus. Effect: The bus company refused to extend the bus line. Cause: People had to walk across a bridge to catch the bus. Effect: Mr. Nixon protested to the bus company. Cause: The bus company refused to extend the bus line. Effect: Mr. Nixon drove his car into town. Cause: Mr. Nixon asked the bus company to make a new stop. Effect: The bus company refused to make a new stop. Which is the correct path of an electrical excitation from the pacemaker to a cardiomyocyte in the left ventricle (LV)? Item11 Time Remaining 43 minutes 58 seconds00:43:58 Item 11Item 11 Time Remaining 43 minutes 58 seconds00:43:58 Which of the following is the name given to the undeciphered Minoan writing that has survived? Multiple Choice linear A hieroglyphics sanskrit linear B What does Greece, Persia, and Rome all have in common? Please help me Please hurry 15. Use inductive reasoning to describe the pattern. Then find the next two numbers in the pattern.-9, -4, 1, 6, ... Smooth endoplasmic Reticulum has ribosomes attached to its surface. correct and rewrite the following. Which of the following types of decisions involves deciding whether to perform a particular activity in-house or purchase it from an outside supplier? A. Special-orderB. Make-or-buyC. Continue or discontinueD. Sell-or-process further Having trouble.. help? PLS HELP ME ON THIS QUESTION I WILL MARK YOU AS BRAINLIEST IF YOU KNOW THE ANSWER PLS GIVE ME A STEP BY STEP EXPLANATION!! 1. 108 identical books have a mass of 30 kg. Find(i) the mass of 150 such books(ii) the number of such books that have a mass of 20 kg If the Fed increases ior enough, such that it will raise the intersection point with the vertical portion of reservesupply, then the equilibrium fed funds rate will:_________