Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search & Filtering

Explain what is meant by a Programming Paradigm and the main characteristics of Procedural, Object oriented and Event-driven paradigms and the relationships among them. Write small snippets of code as example for the above three programming paradigms using a suitable programming language(s). you also need to critically evaluate the code samples that you have given above in relation to their structure and the unique characteristics.


Using your Operating Systems knowledge of threads, model. Write a code of how to interrupt a thread in c++

Write a C++ program using the information describe above that computes the maximum load in lbs(pounds) that can be placed at the end of an 8-foot (96 inches) 2” × 4” wooden beam so that the stress on the fixed end is 3000 lb/in2 .



Program that will create 2 one-dimensional arrays then performs multiplication of integers entered into the array .sum of all integers in Array 1, Array 2 and the sum of all products


sample:


#include<stdio.h>

#include<conio.h>

main()

{

int arra[5], arrb[5], i, y=3,sum[5];

clrscr();

gotoxy (5,2); printf("Array A");


for(i=0; i<=4; i++)

 {

  gotoxy(8, y);scanf("%d", &arra[i]);

  y++;

 }

 y=y-5;

gotoxy (20,2); printf("Array B");


for(i=0; i<=4; i++)

 {

  gotoxy(30, y);scanf("%d", &arrb[i]);

  y++;

 }


 for(i=0; i<=4; i++)

 {


  sum[i]=arra[i]+arrb[i];


 }

gotoxy (60,2); printf("Sum");

 y=y-5;

for(i=0; i<=4; i++)

 {

  gotoxy(60, y);printf("%d", sum[i]);

  y++;

 }





getch();

}


. Consider the loop from Section 8.3 of your textbook.

prefixes = 'JKLMNOPQ'
suffix = 'ack'

for letter in prefixes:
print(letter + suffix)

Put this code into a Python script and run it. Notice that it prints the names "Oack" and "Qack".

Modify the program so that it prints "Ouack" and "Quack" but leaves the other names the same.

Include the modified Python code and the output in your submission.

2. Give at least three examples that show different features of string slices. Describe the feature illustrated by each example. Invent your own examples. Do not copy them for the textbook or any other source.

2.1 You are required to evaluate the performance of the selected algorithms from Question 1 by using

the following assumptions in your computation: (15)

ALGORITHM 1

True Positive = 65

True Negative = 70

False Positive = 80

False Negative = 90

ALGORITHM 2

True Positive = 75

True Negative = 80

False Positive = 40

False Negative = 45

Compute the following Machine Learning metrics by showing your working:

Accuracy

Precision

Recall

F1-Measure

2.2 Compare the performance of the selected algorithms from Question 1 based on the Accuracy and

Precision values. (5)

2.3 Contrast the performance of the selected algorithms based on the Recall and F1- Measure. (5)


In South Africa, Buses are used as one of the main transport servicesfor people in the country.

Everyday, they follow the same route from a particular town/city/shopping complex etc., to

another location point.

Create an application that uses a recursive function to:

Allow the bus driver to accept payments from passengers.

Check every bus stop to ensure that it knows whether or not a passenger should still

be in bus or off.

The system should:

use a recursive function to keep accepting passengers in each bus stop until the

second last stop.

be aware of how many stops are left.

Assume that there are seven bus stops from the starting point to the last point. (excluding the

starting and the last point)


A firewall is Network security device that monitors incoming and outgoing network traffic as well

as permits or blocks data packets based on a set of security rules”.

Critically discuss how a firewall operates and the various types of firewalls (Use appropriate

diagram to corroborate your discussion)


Weekends

Given two dates D1 and D2, write a program to count the number of Saturdays and Sundays from D1 to D2 (including D1 and D2).The date in string format is like "8 Feb 2021".

Input: The first line of input will contain date D1 in the string format.

The second line of input will contain date D2 in the string format.

Output: The output should be a single line containing two integers separated by space.

Explanation: For example, if the given dates are "25 Jan 2021" and "14 Feb 2021", the Saturdays and Sundays dates from "25 Jan 2021" to "14 Feb 2021" are

"30 Jan 2021" is a Saturday

"31 Jan 2021" is a Sunday

"6 Feb 2021" is a Saturday

"7 Feb 2021" is a Sunday

"13 Feb 2021" is a Saturday

"14 Feb 2021" is a Sunday

So the output should be

Saturday: 3

Sunday: 3

Sample Input 1

25 May 2019
22 Dec 2021

Sample Output 1

Saturday: 135
Sunday: 135

Secret Message - 2

Given a string, write a program to print a secret message that replaces characters with numbers 'a' with 1, 'b' with 2, ..., 'z' with 26 where characters are separated by '-'.

Note: You need to replace both uppercase and lowercase characters. You can ignore replacing all characters that are not letters.

abcdefghij12345678910

klmnopqr1112131415161718

stuvwxyz1920212223242526

Output

The output should be a single line containing the secret message. All characters in the output should be in lower case.

Explanation

For example, if the given input is "python", "p" should replaced with "16", similarly"y" with "25","t" with "20","h" with "8","o" with "15","n" with "14". So the output should be "16-25-20-8-15-14".

Sample Input 1

python

Sample Output 1

16-25-20-8-15-14

Sample Input 2

Foundations

Sample Output 2

6-15-21-14-4-1-20-9-15-14-19
LATEST TUTORIALS
APPROVED BY CLIENTS