Reference no: EM131406763
Please see the attachment for algorithm. We need to use Python for this short programming assignment.
For this assignment, you need to create a function that implements the Triangle Classification Algorithm. The algorithm has a lot of steps in it, but each step is simple. We have covered enough material to implement this.
The Triangle Classification Algorithm accepts three integer lengths and it returns a 1, 2, 3, or 4. The three lengths represent possible lengths to the sides of a triangle. Returning a 1 means that the lengths would form a scalene triangle. Returning a 2 means that the sides would form an isosceles triangle. Returning a 3 means that the sides would form an equilateral triangle. Returning a 4 means that the sides cannot form a triangle. For example, sides 1, 1, and 10 cannot form a triangle.
Below you will find a control flow graph of the algorithm. The brackets in the graph [ and ] are just there as a means of referencing each condition. Also, the || symbol is or. The top oval says, "Read i, j, k". These variables should be passed in as parameters to your function. The second oval is equivalent to
if i <= 0 or j <= 0 or k <= 0
Everything else on the chart should be easy to understand, but ask questions if needed.
Write a function for the implementation of the Triangle Classification Algorithm. Also, write a program that uses the function. This program should ask the user to enter the three lengths, and it returns the result of calling the function.
Enabling aging and scavenging on the domain controllers
: The Sr. network Administrator has tasked with you enabling aging and scavenging on the domain controllers. In your own words, provide instructions on how to enable aging and scavenging?
|
Total sales for a zip code for a specific zip code
: Develop a PL/SQL anonymous block that displays the total sales for a zip code for a specific zip code. You may use any of your zip codes you wish.
|
What is the selectivity of an equality predicate on key
: CSC 553 Advanced Database Topics Assignment. Consider the relation r (Key, Name, Address). The relation takes 200 blocks on disk and holds 10000 tuples. What is the selectivity of an equality predicate on Key
|
Managing threats and opportunities of open corporation
: Discuses websites which contain articles and information in the area of Management. The articles written on these websites are based on secondary information. The Authenticity of source is not confirmed, so these content cannot be used as a sourc..
|
Triangle classification algorithm
: For this assignment, you need to create a function that implements the Triangle Classification Algorithm. The algorithm has a lot of steps in it, but each step is simple. We have covered enough material to implement this.
|
Is it role of government to provide incentives to business
: MBA 665- Is it the role of government to provide incentives to business? Why or why not? Do you agree with Michigan's decision to extend tax credits in the manner it has? Why or why not?
|
Do you believe that tonys family should be part of treatment
: When speaking to the juvenile justice probation officer, Tony stated that drinking and marijuana was not a serious issue and that his parents did it all the time. With this statement, the juvenile probation officer realized that this was not a one..
|
Is lsb watermarking robust against attacks
: Is LSB watermarking robust against attacks? If yes, explain. If not, why not? You can choose specific watermark attacks to explain your answer.
|
What entities are identified in the previous scenario
: Based on the case scenario and your answers to a, b, and c, prepare an entityrelationship diagram. Be sure to specify the cardinalities for each relationship.
|