Computers and Technology, 17.12.2020 17:50 breiajanae880
You will create a program that will take in the values of 3 sides of a triangle and determine if that triangle is a right triangle by using the Pythagorean Theorem.
I have provided the pseudocode for you below. All you need to do is translate the pseudocode to a Python program that will run and output correctly if the user has entered a Pythagorean triple or not..
You can test your program by entering the following values:
Enter 12, 5, 13 and it should tell you βYes! You have a right triangle.β
Enter 5, 7, 10 and it should tell you βNo! You DO NOT have a right triangle.β
PROCEDURE getSides()
{
>
DISPLAY (What is the length of the first side?)
side1 β INPUT()
DISPLAY (What is the length of the second side?)
side2 β INPUT()
DISPLAY (What is the length of the third side?)
side3 β INPUT()
}
PROCEDURE decideHypotenuse()
{
>
IF ((side1 > side3) AND (side1 > side2))
{
hypotenuse β side1;
leg1 β side2;
leg2 β side3;
}
ELSE
{
leg1 β side1;
IF (side2 > side3)
{
hypotenuse β side2;
leg2 β side3;
}
ELSE
{
hypotenuse β side3;
leg2 βside2;
}
}
}
PROCEDURE isItRight()
{
IF ((leg1 * leg1 ) + (leg2 * leg2 ) == (hypotenuse * hypotenuse ))
{
DISPLAY (Yes! You have a right triangle.)
}
ELSE
{
DISPLAY (No! You DO NOT have a right triangle.)
}
}
getSides()
decideHypotenuse()
isItRight()
Answers: 1
Computers and Technology, 23.06.2019 09:50
Allison and her group have completed the data entry for their spreadsheet project. they are in the process of formatting the data to make it easier to read and understand. the title is located in cell a5. the group has decided to merge cells a3: a7 to attempt to center the title over the data. after the merge, allison points out that it is not centered and looks bad. where would the title appear if allison unmerged the cells in an attempt to fix the title problem?
Answers: 2
Computers and Technology, 24.06.2019 08:00
How can smart devices benefit businesses, organizations, and social communities in the global marketplace?
Answers: 1
Computers and Technology, 24.06.2019 10:00
What did i do wrong with this const discord = require('discord.js'); var bot = new discord.client(); const token = 'ntm3mjcxmtu1mjg3ote2ntq2.dyogew.dpfiwfpuifzuzvifop-csuxasnm' const prefix = "! " bot.registry.registergroup('simple', 'simple'); bot.registry.registerdefaults(); bot.registry. + '/commands'); bot.on('message', message => { if(message.content == 'hi! ') { message.channel.send ('@everyone sup, how is @everyone day going'); } if(message.content == 'h3lp') { message.channel.send ('dose not have any commands yet'); } bot.on('ready', function() { console.log("ready") }); bot.login(token);
Answers: 1
Computers and Technology, 24.06.2019 11:00
Need fast im timed in a paragraph of 125 words, explain at least three ways that engineers explore possible solutions in their projects.
Answers: 2
You will create a program that will take in the values of 3 sides of a triangle and determine if tha...
Mathematics, 13.02.2020 01:35
Computers and Technology, 13.02.2020 01:35
Mathematics, 13.02.2020 01:35
Social Studies, 13.02.2020 01:36
Mathematics, 13.02.2020 01:36
Mathematics, 13.02.2020 01:36
Social Studies, 13.02.2020 01:36
Mathematics, 13.02.2020 01:36
Mathematics, 13.02.2020 01:36
Computers and Technology, 13.02.2020 01:36