I need some help of solving these two questions in python. I tried to do them bu
ID: 3747154 • Letter: I
Question
I need some help of solving these two questions in python. I tried to do them but I am new in python and I couldn’t do it. Challenge: try to enite this progan, using anty thre wriahles 2) triangle-py Write a program that will uak the user to input three posidie sumbers in descesdie oder The pogram ill the g specilie peocedure. coenpute Ibe thrre ataths of tse triangle that has those 'kree ti-ers in adelenetle, unkom You will do this hy using the Laa of Coinus to fitnd the largost anzle, hen wing the Law of Sines to fiud the tidde anle and then subtract to fnd the smallest angle. (Tereor ways to proowl y might ay they are better woys However, I am insisting that you do it in this answ I ntrongly sagavet you look up the Law of Sines and the Law of Cnines in cawe yorvw forg en thm A,don't ng about converting from radians to degzers. In acidition, you should Google the tiracoemetric ant invera trigintri fupetions that you will need for your cakultions When you run ywar program. nsamile rin night ank tike this twhere de wet pt, 5, 4 aul s, Eater largest aide tength: Enter Eatez eallest side ength: 3 The acgles are 53.18010235415598 or this twhere the user ioputs 4.1.2.6 and 2.4) Enter siddle nide 1ength: 2.6 Eater mallest side Jength: 2.4 The angles are 110 , 103509787916 83.34604 738600 Hiuts: the krgist anugle is eppoeite the agest side, the sokbidle anke is osite the modile sidle eaed the smallest sge is opposite the sunlest sile. Als, e ery arefl about arder of opua ic Specifications: your perogran serust - ask the taser to enter three side engths in desc ncing cader two asecutiw equul site is valid also), each of which can be say positive sataber evea oc with decimals. Yu yastue hat the wwt cbeys- te use: esters sides out of unambers that are the side engths of a real triangle That is, you don't have to wusy abot the wer estering 100, 2 asd 1 becsuise no real triangle has thoee three sidelenle renber the triargle inequaity") e correctly calculate the throe angles in the triaugle, in degrees, wke the ssauptous cned ahove. , use the strategy I outlined abonw Law of Cos to fiae! the Largst sngle, Lam of S to find the rkddle anale, atd aukrating to find the stra, int a , pritt out the three ainces in dezres each on a separate line. Yus 'ka't ax" to wtry alon! mAny drama places they are outpuat with descending erder, or dowt setisty the triengle ineueity. You ight aeod to roud chead to de this. 3) binary py Recall that we briefly discussed the binery ayetees fur bue too) in class. A mimher is repirseated a binary by a sequence of t's and o's (also kown as bets), which have place velues given by powers of 2 irstead of powers of 10. Is an eight-dlägit bHasry namaber, the left digit would be the 128's digit, the sext digit would be the 64's digit, the third would be the 32sdt followed by the 16%, 8, 4, 2'n and 1's digit For example, 01011101 in binaay would represent the (as10) number 93, because thes num bor has, reuding from the ldt, no 128, oue 64, o 32, onc 16, one 8, oce 4, so 2, aad oue 1, and 64 16-8 4+3 Ad 00D0011 woukd represen the (hase-10) sumber 7, since this mumber has no 128, no 64, no 32, no 16, no 8, one 4, onc 2, and oneExplanation / Answer
I am completed First Program (Find Angles of Traingle)
from math import acos, degrees
#Read lengths of triangle
a=float(input("Enter largest side length: "))
b=float(input("Enter middle side length: "))
c=float(input("Enter smallest side length: "))
# Calculate angles using cosicant (acos) and degress functions
t1=degrees(acos((b*b+c*c-a*a)/(2.0*b*c)))
t2=degrees(acos((a*a+c*c-b*b)/(2.0*a*c)))
t3=degrees(acos((a*a+b*b-c*c)/(2.0*a*b)))
# display angles
print(t1)
print(t2)
print(t3)
OUTPUT
Enter largest side length: 5
Enter middle side length: 4
Enter smallest side length: 3
90.0
53.13010235415599
36.86989764584401
Enter largest side length: 4.1
Enter middle side length: 2.6
Enter smallest side length: 2.4
110.105509787916
36.54844282607486
33.346047386009126