Page 201 - Computer Science Class 11 Without Functions
P. 201
Ans: '''
Objective: To check whether the given angles form a triangle
Inputs: angle1, angle2, angle3 in degree
Output: message if the angles forms a triangle or not
'''
angle1 = int(input('Enter a first angle in degrees: '))
angle2 = int(input('Enter a second angle in degrees: '))
angle3 = int(input('Enter a third angle in degrees: '))
if angle1+angle2+angle3 == 180:
print('Given angles form a triangle')
else:
print("Given angles don't form a triangle")
Assessment
A. Multiple Choice Questions
1. WhtnlShtltxtcuSionlofltSnStetnStlinlnlprogrneldtptndtlonlShtltvnaunSionloflnlcondiSion,lfaowloflconSroalitlknownlntl
____________lfaow.
n.l IStrnSivtl b. CondiSionnal c. tqutnSinal d. Looping
2. WhichloflShtlfoaaowingltSnStetnStlwiaalrttuaSlinlnnltrror?l
n.l if(2):
print('ABCD')
b.l if(0):
print('ABCD')
c.l if(2, 0):
print('ABCD')
d.l if(2)
print('ABCD')
3. WhnSlwiaalbtlShtlouSpuSlprofuctdlonltxtcuSionloflShtlcodtlgivtnlbtaowliflShtlvnauttloflnlnndlblnrtl10lnndl-5lrttptcSivtay?
a = 10
b = -5
if a%2!=0 or a+b>0:
print('You are through')
else:
print('Try Again')
OpSiont:
n.l You are through
b. Try Again
c. No Output
d. Error
Conditonnal SnStetnSt 199

