Question from Chapter Python Class 10
Attachments:
Answers
Answered by
3
Answer:
Question 1:
- Shorthand expression of A = A + 10 is - A +=10
- Shorthand expression of B = B - 1 is - B-=1
Question 2:
The given statements can be display by writing the given códe,
print('"A friend is one who knows you,')
print('"Understands" you, "accepts"')
print("you as is, and, gently allows")
print('you to "grow". "')
Question 3:
Using 1 print() function, it goes like,
print("I","Like","Python","Programming.",sep="\n")
sep acts as separator. Here, new line is the separator.
Question 4:
- Output is: A = 10, B = 8
Explanation:
Initially,
A = 5
B = 5 (A)
A*=2 multiplies A with 2 and result becomes 10.
B+=3 adds 3 to B and result becomes 8.
So, output - 10,8
Question 5:
Output is as follows:
A < B False
A!= B True
Explanation:
A < B is False as 54 < 45 is false.
A != B is True as 54 is not equal to 45.
Similar questions