22. Complete the given program with suitable commands 2
a = ____(input(“Enter Value1 :”))
b = int(input(“Enter Value2 :”))
c=a-b
print(“Difference=”,___)
23. Rectify the error in the following statements: 3
b=true
city=”Bangalore’
amt=80.5.0
print(“City =”, City)
26. Answer the following with reference to the below values and
Memory location. 5
20 21 22 23 24
20200 20216 20232 20248 20264
Statement 1 : age =20
i. id(age) _______
Statement 2 : age = age +2
ii. id(age) _______
iii. id(22) _______
iv. id(20) _______
v. id(age) & id(22) are same finally______(True/False)
Answers
Answer:
happy birthday
From thegiven question the correct answer are as follows:(underlined words are correct answer )
a = int (input(“Enter Value1 :”))
b = int(input(“Enter Value2 :”))
c=a-b
print(“Difference=”,c)
23. Rectify the error in the following statements: 3
b=true
city=”Bangalore’
amt=80.5.0
print(“City =”, City)
In above statments the error occur in print(“City =”, City)
because the variable city=”Bangalore’ is not match with the print(“City =”, City) As the declared variable is starting with the small c and in the print statment there is capital C ..c programing is case sensitive programmin.
Statement 1 : age =20
i. id(age) 20
Statement 2 : age = age +2
ii. id(age) 22
iii. id(22) 24
iv. id(20) 22
v. id(age) & id(22) are same finally______(True/False)
True . the statment is true .