The Classic Triangle Testing Problem, (Myer's Triangle): A program reads three integer values. The three values are interpreted as representing the lengths of the sides of a triangle. The program prints a message that states whether the triangle is scalene, isosceles, or equilateral. Develop a set of test cases (at least 6 ) that you feel will adequately test this program. (This is a classic testing problem and you could find numerous explanations about it on the internet. I would recommend that you try to submit your own answer, based on your understanding of the topic)
Let’s define what the three different types of triangle requirements for the side’s lengths are:______.

Answers

Answer 1

Answer:

Here is the Python program:

def MyersTriangle(a, b, c):  #method to test triangles

     

    if not(isinstance(a, int) and isinstance(b, int) and isinstance(c, int)):  #checks if values are of type int

         return 'Enter integer values'  

         

    elif a==0 or b==0 or c==0: #checks if any value is equal to 0

         return 'Enter integer values greater than 0'

         

    elif a<0 or b<0 or c <0:  #checks if any value is less than 0

         return 'All values must be positive'

         

    elif not (a+b>=c and b+c>=a and c+a>=b):  #checks if triangle is valid

         return 'Not a valid triangle'

         

    elif a == b == c:  #checks if triangle is equilateral

         return 'triangle is equilateral'

         

    elif a == b or b == c:  #checks if triangle is isoceles

         return 'triangle is isoceles'

         

    elif a != b and a != c and b != c:  #checks if triangle is scalene

         return 'triangle is scalene'        

#test cases

print(MyersTriangle(2.4,7.5,8.7))  

print(MyersTriangle(0,0,0))

print(MyersTriangle(-1,5,4))

print(MyersTriangle(10,10,25))

print(MyersTriangle(5,5,5))

print(MyersTriangle(3,3,4))

print(MyersTriangle(3,4,5))

   

Explanation:

The program uses if elif conditions to check:

if the values are integers: this is checked by using isinstance method that checks if values belongs to a particular int. If this returns true then values are integers otherwise not

if values are not 0: this is checked by using logical operator or between each variable which checks if any of the values is 0

if values are not negative: This is checked by using relational operator < which means the values are less than 0

if values make a valid triangle: this is checked by the rule that the sum of two sided of the triangle is greater than or equal to the third side.

and then checks if the triangle is scalene, isosceles, or equilateral: This is checked by the following rules:

For scalene all three sides are unequal in length

For isosceles any of the two sides are equal in length

For equilateral all sides should be equal in length.

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

The Classic Triangle Testing Problem, (Myer's Triangle): A Program Reads Three Integer Values. The Three

Related Questions

Write an if statement that assigns 20 to the variable y, and assigns 40 to the variable z if the variable x is greater than 100. python

Answers

Answer:

if x > 100:

    y = 20

    z = 40

Explanation:

This line checks if variable x is greater than 100

if x > 100:

This line assigns 20 to y

    y = 20

This line assigns 40 to z

    z = 40

The if statement that assigns 20 to the variable y, and assigns 40 to the variable z if the variable x is greater than 100 is as follows:

x = int(input("input an integer number: "))

if x > 100:

   y = 20

   z = 40

   print(y)

   print(z)

The first code we ask the user to input an integer number and stored it in the

variable x.

If the user input is greater than x, then y is assigned to 20 and z is assigned to 40.

We print the assigned value of y and z if the user entered an input greater

than 100.

learn more: https://brainly.com/question/19036769?referrer=searchResults

Which option should you select to accept a tracked change?
OA. Accept
OB.
Reject
O c.
Review
OD
Delete

Answers

Accept is the answer

3.4 Code Practice: Question 1

Answers

Answer:

color = input("What color? ")

if (color == "yellow"):

   print("Correct!")

else:

   print("Nope")

Explanation:

My code is dependent on if the color is supposed to be case sensitive

Remember to check the on your vehicle first to see if a repair is covered by the manufacturer.

Answers

Answer:

insurance or warranty

Explanation:

It should be insurance because insurance can cover things like car repairs and other things that goes wrong. warranty could work too because it kind of means the same thing.

The state way of grading drivers is called what?

*

Answers

Oh yeah I forgot what you did you do that I mean yeah I forgot to tell you something about you lol lol I don’t want to see it anymore

In ____________, a large IP address block could be divided into several contiguous groups and each group be assigned to smaller networks.

Answers

There are no answers given in this question

Thomas has decided to key an agenda for the FBLA meeting using a column format. What is recommended to guide the reader’s eye and control the left to right flow or text?

Answers

Incomplete question. The full question reads;

Q. Thomas has decided to key an agenda for the FBLA meeting using a column format. What is recommended to guide the reader's eye and control the left-to-right flow of text?

Answer choices:

table featuredot leader tableft alignment tooldouble space

Answer:

dot leader tab

Explanation:

Indeed, Thomas could use the dot leader tab on MS word to guide the reader's eye and control the left-to-right flow of the text so the reader can note the agenda.

For example, below is a typical way the dot leader tab would look like on a document:

............... Agenda 1

............... Agenda 2

............... Agenda 3

What name is given to the process or mechanism of granting or denying use of a resource typically applied to users or generic network traffic?

Answers

Answer:

Access control

Explanation:

A computer network connects two or more computer devices to communicate and share resources. When computers or workstations in a network are connected, data can be directly transferred from a source to a target workstation.

In most cases in an enterprise network, there is a need to restrict access to certain information or resources, so access control protocols are used to secure sensitive information from unauthorized view.

1. Write a function named problem1 to simulate the purchases in a grocery store. Write statements to read the price of each item until you enter a terminal value to end the loop. Calculate the subtotal and add a sales tax of 8.75% to the subtotal. Return the subtotal, the amount of the sales tax, and the total. Call the function and display the return results. (25 pts)​

Answers

Answer:

ok

Explanation:

Write a statement to create a new Thing object snack that has the name "potato chip". Write the statement below.

Answers

Answer:

New Thing = ("Potato Chip")

Explanation:

Java is a programming language which is used by IT professional for building enterprise applications. The new thing object can be named as potato chip by entering the command statement. The statement must be enclosed in the inverted commas for the application to understand the input.

Which of the following may be stored in an
e-mail address book? Check all of the boxes that
apply.
names
e-mail addresses
physical addresses
subjects of e-mails
fax numbers

Answers

Answer:

names, email addresses, subjects of e-mails

Explanation:

Answer:

names

e-mail addresses

physical addresses

fax numbers

Explanation:

correct answers

Define a Python function named matches that has two parameters. Both parameters will be lists of ints. Both lists will have the same length. Your function should use the accumulator pattern to return a newly created list. For each index, check if the lists' entries at that index are equivalent. If the entries are equivalent, append the literal True to your accumulator. Otherwise, append the literal False to your accumulator.

Answers

Answer:

The function in Python is as follows:

def match(f1,f2):

    f3 = []

    for i in range(0,len(f1)):

         if f1[i] == f2[i]:

              f3.append("True")

         else:

         f3.append("False")

    print(f3)

Explanation:

This line defines the function

def match(f1,f2):

This line creates an empty list

    f3 = []

This line is a loop that iterates through the lists f1 and f2

    for i in range(0,len(f1)):

The following if statement checks if corresponding elements of both lists are the same

         if f1[i] == f2[i]:

              f3.append("True")

If otherwise, this is executed

         else:

         f3.append("False")

This prints the newly generated list

    print(f3)

Cable television systems originated with the invention of a particular component. What was this component called?​

Answers

Answer:

Cable television is a system of delivering television programming to consumers via radio frequency (RF) signals transmitted through coaxial cables, or in more recent systems, light pulses through fibre-optic cables. This contrasts with broadcast television (also known as terrestrial television), in which the television signal is transmitted over the air by radio waves and received by a television antenna attached to the television; or satellite television, in which the television signal is transmitted by a communications satellite orbiting the Earth and received by a satellite dish on the roof. FM radio programming, high-speed Internet, telephone services, and similar non-television services may also be provided through these cables. Analog television was standard in the 20th century, but since the 2000s, cable systems have been upgraded to digital cable operation.

Explanation:

[tex]hii[/tex]have a nice day ✌️✌️

Cable television systems originated with the invention of a particular component. The component is a coaxial cable. The correct option is A.

What is a cable television system?

Radiofrequency (RF) signals are transferred through coaxial cables, or in more current systems, light pulses are transmitted through fiber-optic cables, to deliver television programming to viewers via cable television networks.

This is in contrast to satellite television, which transmits the television signal via a communications satellite orbiting the Earth and receives it via a satellite dish.

It broadcast television, in which the television signal is transmitted over the air by radio waves and received by a television antenna attached to the television.

Therefore, the correct option is A. coaxial cable.

To learn more about the cable television system, refer to the link:

https://brainly.com/question/29059599

#SPJ2

The question is incomplete. Your most probably complete question is given below:

A. coaxial cable

B. analog transmission

C. digital transmission

D. community antenna

What are the negative impacts of cloud computing? Answer this question using examples, in at least 6-8 full sentences.

Answers

Answer:

The answer to this question is given below in the explanation section.

Explanation:

There are many benefits of cloud computing, but despite having benefits, there are many negative impacts of cloud computing.

The most known negative impact of cloud computing are given below:

Data confidentiality risk:

when you are using cloud computing services, that means you are handing over your all information over the internet. There is a risk of data confidentiality in this context, your data's security is totally dependent on the service provider. If your service provider security breaches, then your business reputation will also get impacted because your confidential data is managed and controlled by the service provider whose security is breached by someone or hackers.

Depend on internet connection:

Another disadvantage is that if you are working in a developing or under-developed country and you are using cloud computing services. Then your all business managing is relying on the internet. As you know, in developing countries internet speed does matter 24/7 and it is not as fast as required to use cloud computing services for your business.

Data mobility Issue:

Data mobility refers to sharing data between cloud services and in case if the user terminates their services of cloud computing then how you can handle such a situation.

Live help Issue:

some cloud service providers provide you the services online and help you online if you find any error in your services, imagine if in your company 24/7 IT staffs are working on a project, then how you can handle if an error occurs in your cloud computing services and online help also not available. so in this case cloud computing impact negatively your project and organization.  

What will be the output of the following program? Assume the user responds with a 5.

answer = input ("How many hamburgers would you like? ")
priceBurger = 3.00
intNumberBurgers = float(answer)
moneyDue = intNumberBurgers * priceBurger
print ("You owe $", moneyDue)

An error occurs.

You owe $15.0

You owe $ 15.0

You owe $ moneyDue

Answers

The output will be: You owe $ 15.0

The output of the following program, when the user responds with a 5 is You owe $15.0. The correct option is b.

What is the output?

Programs require the entry of data. This data is utilized by the software, which then produces data (or information). The output of software or other electronic device is whatever information it processes and transmits.

Anything that appears on the computer screen, like the text you type on the keyboard, is considered the output.

The floating-point value of "answer" is how many hamburgers would you like is set to a string indicating the response when someone responds to an input; in this case, the value is 5.

As a result, if the user responds with 5, the amount due is set to the price times the hamburger price:

You owe $", money Due = 3.00 x 5 = 15.00

Therefore, the correct option is b. You owe $15.0.

To learn more about output, refer to the below link:

https://brainly.com/question/28903099

#SPJ5

Defining the components of the system and how these components are related to each other is part of the:____________.a. architectural design phase.b. detailed design phase.c. requirements phase.d. All of these are correct

Answers

Answer:

a. architectural design phase.

Explanation:

Architectural design phase basically deals with the interaction between the very important and essential modules of the software system that is to be developed.

Hence, defining the components of the system and how these components are related to each other is part of the architectural design phase. These components include the input, process, and output, they are linked to their respective interface in order to establish the functionality and framework of the software system.

All of the different devices on the internet have unique addresses.

Answers

Answer:

Yes

Explanation:

Just like a human fingerprint, no 2 computers are the same.

Office suites are also known as suites.

Lotus

utility

productivity

symphony

Answers

Office suites are also known as productivity suites.

What are office suites also known as?

An office suite is also known as to  be a kind of office application suite or office productivity software.

Note that Office suites are also known as productivity suites as it is where a lot of decisions are made that enhances productivity.

Learn more about suites from

https://brainly.com/question/5080206

#SPJ6

Which is true of diagnosing and troubleshooting? Diagnosing attempts to identify the source of a problem, while troubleshooting looks for the nature of the problem. Diagnosing is used to fix problems with hardware, while troubleshooting is used to fix problems in program code. Diagnosing looks for the nature of the problem, while troubleshooting attempts to identify the source of the problem. Diagnosing is used to fix problems in program code, while troubleshooting is used to fix problems with hardware.

Answers

Answer:

the answer is c

Explanation:

i just took the test

Answer:c

Explanation: because Diagnosing looks for the nature of the problem, while troubleshooting attempts to identify the source of the problem.

Which activity is a primary manufacturing process?
A refining raw material
B casting
C molding
D welding joints
E painting a clear coat

Answers

A is the answer for the question

Hi Guys

I have a Computer Science question. Please answer it as soon as possible.

I do not care about the working - I just care about the answer.

10 points guys

Thanks
Me.

Answers

Answer:

The answer to this question is given below in the explanation section.

Explanation:

The answer to this question is given in the attached file.

This is the code that runs for-loop. This loop iterates 5 times and print the value of z variable and even. if value of i variable then it print "even" and z value. else it print z value.

Walmart store wants to compare the sales of five of its stores. Write a complete program to ask the user to enter the sales for 5 stores. Create a bar chart displaying stars representing the sale amount for the day. must follow the requirements main method calls the print method. a for loop is required print method accepts an integer as its parameter representing the sale for the day. display stars based on the sale. one star represents $100 sale. a for loop is required Sample output:

Answers

Answer:

Here is the C++ program.

#include <iostream>  //to use input output functions

using namespace std;   //to identify objects cin cout

   void print(int sales){   //method that accepts integer as its parameter representing the sale for the day

          for(int i=0;i<(sales/100);i++){  //loop to create a bar chart

           cout<<"*";   }   }  //prints stars representing the sale amount for the day

   int main(){          

       int sales1;    // stores the sales of store 1

       int sales2;    // stores the sales of store 2

       int sales3;    // stores the sales of store 3

       int sales4;     // stores the sales of store 4

       int sales5;    // stores the sales for store  5    

       

       cout<<"Enter the sales for store 1: ";  //prompts user to enter sales for store 1

       cin >>sales1;  //reads the value of sales for store 1 and stores it in sales1

       print(sales1);  //calls print method to display start representing the sales amount for the day for store 1

       cout<<"\nEnter the sales for store 2: ";  //prompts user to enter sales for store 2

     cin >>sales2;  //reads the value of sales for store 2 and stores it in sales2

       print(sales2); //calls print method to display start representing the sales amount for the day for store 2

       cout<<"\nEnter the sales for store 3: ";  //prompts user to enter sales for store 3

     cin >>sales3;  //reads the value of sales for store 3 and stores it in sales3

       print(sales3);  //calls print method to display start representing the sales amount for the day for store 3

       cout<<"\nEnter the sales for store 4: ";  //prompts user to enter sales for store 4

     cin >>sales4;  //reads the value of sales for store 4 and stores it in sales4

       print(sales4);  //calls print method to display start representing the sales amount for the day for store 4

       cout<<"\nEnter the sales for store 5: ";  //prompts user to enter sales for store 5

     cin >>sales5;  //reads the value of sales for store 5 and stores it in sales5

       print(sales5);     } //calls print method to display start representing the sales amount for the day for store 5

Explanation:

The program is well explained in the comments attached with each line of the program. Lets say user enters 100 as sales for store 1. Then the for loop works as follows:

for(int i=0;i<(sales/100);i++)

At first iteration:

i = 0

i<(sales/100) is true because 0 is less than 100/100 = 1

so the program moves to the body of loop which has the statement:

cout<<"*"

This prints one asterisk one output screen. Next the loop breaks when i = 1. So this only prints one asterisk in output since one star represents $100 sale. The screenshot of the program along with its output is attached.

A hammer has an input distance of 9 cm and an output distance is 3 cm what is the ideal mechanical advantage

Answers

Answer:

1/3

Explanation:

Other Questions
Giovanni went to Los Angeles, California, for the summer to visit his cousins. He used a map of bus routes to get from the airport to his cousins house. The distance from the airport to his cousins house is 56 km. On his map, the distance is 4 cm. What is the scale factor? Help plz I need help bad This is the experience curve for the fictional Motorcycle STICKER industry. The average slope is .167 meaning that for every doubling of output costs drop 83.3%. Xtreme Stickers Inc. just came out with a brand new product that is better than anything else in the industry. Even though we are talking abut stickers competitors cannot copy you very quickly. As the CEO of Xtreme Stickers Inc. you need to decide how to price your stickers. What pricing model will you choose? James has $36.42 if he can only spend 1/6 of his money, how much money can he spend? 6 1 pls help!! will give brainly!!!wright this sentence in Spanish:What food do you like to eat ?)Remember:Use the correct question word for what. (Hint: It also means which.)Use the correct pronoun before gustar.Use the correct form of gustar.Use correct punctuation and accent marks. I really need help with this one ASAP!!!Explain why volcanoes form at both convergent plate boundaries and divergent plate boundaries. PLEASE HELPPPPPPPmultiply An author wants to explain how her experiences changed her, she should use the _____ organizational pattern.time-ordercause-effectcompare/contrastnone of theseWILL MARK BRAINLIST Predict whether carbon dioxide or water would have a higher boiling point. explain your predicament in terms of attractions between molecules. You ask your pen pal who is your age:________?Yo soy de Panam.Cul es tu nmero de telfonoDe dnde eres tDnde vivesCul es tu direccin 15 blank CDs for $5; 45 blank CDs for $15 What are advantages and disadvantages of Bedouin life? Jordan can ride her skateboard 75 meters in 30 seconds. How long will it take Jordan to ride her skateboard 1,500 meters? Solve on scrap paper and enter your answer on Zearn. meters seconds 75 30 It will take Jordan seconds to ride her skateboard 1,500 meters. Question 6 11 point)What dassification of drugs can commonly be found in the home (in the form ofcertain cleaning supplies)A Stimulants3) Designer DrugsMarijanaD) Intalants Prints are created from an original plate called a A. blockB. matrixC. stencilD. monoprint Could the Holocaust have been prevented? Write an inequality to determine when Apartment A will cost more than Aparment B: Johnny is searching for an apartment and has narrowed it down to two choices. Apartment A has a $300 security deposit and costs $800 each month. Apartment B has a $900 deposit and costs $500 each month. Temperature is a measure of the average _____energy of particles in a substance. Drag the tiles to the boxes to form correct pairs.Identify how each group responded to the forced use of enslaved Africans in colonial America. What if the secretion of that releasing hormone was insufficient? What would happen ?Ill give brainlist answer to who ever answer with a good answer