Computer Science, asked by sonalshah50304, 5 months ago

5. Write the corresponding Python assignment statements:
a) Assign 10 to variable length and 20 to variable breadth.
b) Assign the average of values of variables length and breadth to a variab
Assign a list containing strings 'Paper, 'Gel Pen', and 'Eraser' to a variable sto
e) Assign the concatenated value of string variables first, middle and last to variable
fullname. Add blank spaces appropriately between different parts of names.
6. Write the output of the following:
a) num1 = 4
num2 = numi + 1
numi = 2
print (numi, num2)
b) num1, num2 = 2,6
numi, num2 = num2, numi + 2
print (numi, num2)
c) numi, num2 = 2,3
num3, num2 = num1, num3 + 1
print (num1, numn2, num3)
7. Give the output of the following when numi = 4, num2 = 3, num3 = 2
a) numi += num2 + num3
print (numi)
b) num1 = numi ** (num2 + num3)
print (numi)
c) numi **= num2 + num3
d) num1 = '5' + '5'
print(numi)
e) print(4.00/(20+2.0))
num1 = 2+9*((312)-8)/10
print(numi)
g) num1 = 24 // 4 1/2
print(numi)
h) num1 = float(10)
print (numi)
D) numi = int(3.14)
print (numi)
1) print('Bye' == 'BYE)
k) print(10 I= 9 and 20 >= 20)
1) print(10 + 6*2** 21= 91/4-3 and 29 >= 29/9)
m) print(5 % 10 + 10 < 50 and 29 <= 29)
n) print((0 < 6) or (not(10 == 6) and (10<0)))
I
a​

Answers

Answered by mohanr088
0

Answer:

rint(numi)

e) print(4.00/(20+2.0))

num1 = 2+9*((312)-8)/10

print(numi)

g) num1 = 24 // 4 1/2

print(numi)

h) num1 = float(10)

print (numi)

D) numi = int(3.14)

print (numi)

1) print('Bye' == 'BYE)

k) print(10 I= 9 and 20 >= 20)

1) print(10 + 6*2** 21= 91/4-3 and 29 >= 29/9)

m) print(5 % 10 + 10 < 50 and 29 <= 29)

n) print((0 < 6) or (not(10 == 6) and (10

Similar questions