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
snow_lady [41]
3 years ago
8

test case Exercise 1: Consider the following system: A System reads four integer values from a user. The four values are interpr

eted as representing the lengths of the sides of quadrilateral shape. The system prints a message that states whether the shape is rectangle or square. Function: Description: Test Input Data:
Computers and Technology
1 answer:
taurus [48]3 years ago
5 0

The program displays if the side values of the quadrilateral is a square or rectangle. The required program is written in python 3 thus :

a = int(input('Enter integer input : '))

b = int(input('Enter integer input : '))

c = int(input('Enter integer input : '))

d = int(input('Enter integer input : '))

<em>#the</em><em> </em><em>variables</em><em> </em><em>a</em><em>,</em><em> </em><em>b</em><em>,</em><em> </em><em>c</em><em>,</em><em> </em><em>d</em><em> </em><em>takes</em><em> </em><em>prompt</em><em> </em><em>values</em><em> </em><em>from</em><em> </em><em>users</em><em> </em><em>which are</em><em> </em><em>used</em><em> </em><em>to</em><em> </em><em>compare</em><em> </em><em>if</em><em> </em><em>the</em><em> </em><em>quadrilateral</em><em> </em><em>is</em><em> </em><em>a</em><em> </em><em>square</em><em> </em><em>or</em><em> </em><em>rectangle</em><em>.</em><em> </em>

if(a == b == c == d):

<em>#using</em><em> </em><em>the</em><em> </em><em>assignment</em><em> </em><em>operator</em><em>,</em><em> </em><em>compare</em><em> </em><em>the value</em><em> </em><em>of</em><em> </em><em>a</em><em>,</em><em> </em><em>b</em><em>,</em><em> </em><em>c</em><em> </em><em>and</em><em> </em><em>d</em>

print('Shape is square')

<em>#if</em><em> </em><em>the</em><em> </em><em>values</em><em> </em><em>are</em><em> </em><em>the</em><em> </em><em>same</em><em>,</em><em> </em><em>the</em><em> </em><em>shape</em><em> </em><em>is a</em><em> </em><em>square</em><em> </em>

else :

print('Shape is Rectangle')

<em>#otherwise</em><em>,</em><em> </em><em>the</em><em> </em><em>shape</em><em> </em><em>is a</em><em> </em><em>rectangle</em><em> </em>

<em>The</em><em> </em><em>sample</em><em> </em><em>run</em><em> </em><em>of the</em><em> </em><em>program</em><em> </em><em>is</em><em> </em><em>attached</em><em> </em><em>below</em><em>.</em><em> </em>

<em>Learn</em><em> </em><em>more</em><em> </em><em>:</em><em> </em><em>brainly.com/question/18405415</em>

You might be interested in
What are the trinity of the computer system
barxatty [35]

Answer:

I think the answers are input, processes, output

6 0
3 years ago
_________ analysis is a data mining application that discovers co-occurrence relationships among activities performed by specifi
SSSSS [86.1K]

<u>Affinity analysis </u>is a data mining application that discovers co-occurrence relationships among activities performed by specific individuals or groups, such as market basket analysis.

<h3>What is affinity analysis?</h3>

Affinity Analysis is a type of predictive analysis method that uses data mining to uncover hidden, insightful correlations between various variables based on how frequently they occur between distinct persons or groups in the dataset.

The Product Affinities Analysis sheds light on the items that clients buy in tandem during a shopping trip, such as how they are filling out a broader weekly shopping trip or putting together specific meals.

Therefore, Affinity analysis is a data mining tool that identifies co-occurrence patterns between tasks carried out by particular people or groups, like market basket analysis.

To learn more about affinity analysis, refer to the link:

brainly.com/question/13077215

#SPJ5

5 0
1 year ago
Read 2 more answers
Unlike images, tex and hyperlinks, vidoes _____ A) are playable in source view B are not used to affect user's emotions C) can b
KATRIN_1 [288]

Answer:

this is a tough question but I suggest that you choose c)

7 0
4 years ago
Can you help me with these AP Computer Science Questions. (THIS IS DUE BY 1:30 PM today) you have to evaluate the Boolean Expres
vfiekz [6]

Answer + Explanation:

'and' -> both statements are 'True' to evaluate as 'True'.

'or' -> at least one statement is 'True' to evaluate as 'True'.

1. True (grade has the value of 82, so the statement evaluates to 'True').

2. True (Both statements are true, this expression evaluates to 'True').

3. False (Both statements are false, this expression evaluates to 'False').

4. True (the != operator means <em>not equal.</em> Since the 'name' variable holds the string 'Rumpelstiltskin', name != 'Rumpelstiltskin' evaluates to 'False'. The 'not' operator returns the opposite of the given Boolean expression, so this expression evaluates to 'True').

5. True (name == 'Rumpelstiltskin' evaluates to 'True', so this expression is true).

6. False (All statements evaluate to 'False').

7. True (All statements evaluate to 'True').

8. False (All statements evaluate to 'True' except for <em>not(x == - 3) </em>which evaluates to 'False', so the whole statement now becomes false).

9. True (<em>grade+5 < 90 and grade >= 80 </em>evaluates to 'True', so this whole expression becomes true).

10. True (<em>grade > 0 and x % 2 == 1 </em>evaluates to 'True')

Hope this helps :)

7 0
3 years ago
given:an int variable k,an int array currentMembers that has been declared and initialized,an int variable memberID that has bee
Oksi-84 [34.3K]

Answer:

// The code segment is written in C++ programming language

// The code segment goes as follows

for (k = 0; k < nMembers; k++)

{

//check if memberID can be found in currentMembers

if (currentMembers[k] == memberID){

// If yes,

// assigns true to isAMember

isAMember = true;

k = nMembers;

}

else{

isAMember = false;

// If no

// assigns false to isAMember

}

}

// End of segment:

The following assumption were made in the code segment above.

There exists

1. An already declared and initialised int array currentMembers.

2. An already initialised int variable memberID

Line 3 initiates a loop to scan through the array

Line 6 checks for the condition below

If current element of array equals memberID then

It assigns true to isAMember and nMembers to k

Else

It assigns false to isAMember

7 0
3 years ago
Other questions:
  • Acme Parts runs a small factory and employs workers who are paid one of three hourly rates depending on their shift: first shift
    5·1 answer
  • What type of accessory device can be used to measure AC current with a VOM without opening the circuit? A. Split inductor B. Amp
    13·1 answer
  • Brooke is trying to save enough money in the next fifteen months to purchase a plane ticket to Australia. Every month Brooke sav
    9·1 answer
  • Variables set equal to patterns are said to be:_______.
    7·1 answer
  • Sandra wants to have her new technology up and running as soon as possible. She is looking for a tool that she can
    8·1 answer
  • What are the values of a[k] and a[k+1] after code corresponding to the following pseudocode runs?
    9·2 answers
  • To control how and when the slides should appear during the slide show, we use the__________________ feature​
    12·1 answer
  • What was Bill Gates purpose for starting a business?
    12·1 answer
  • ____ is a technology that exists inside another device
    9·2 answers
  • What are the steps for rearranging the layout of a form?
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!