Informatics Practices
Give the output of the following when num1 = 4, num2 = 3, num3 = 2.
num1 = '5' + '5'
print (num1)
Python Control Flow
1 Like
Answer
55
Working
The expression '5' + '5' performs string concatenation as they are enclosed in quotes. Therefore, '5' and '5' are concatenated to form the string '55', which is then assigned to num1. The print(num1) statement outputs the string '55'.
Answered By
2 Likes
Related Questions
Give the output of the following when num1 = 4, num2 = 3, num3 = 2.
num1 = num1 ** (num2 + num3) print (num1)Give the output of the following when num1 = 4, num2 = 3, num3 = 2.
num1 **= num2 + c print (num1)Give the output of the following when num1 = 4, num2 = 3, num3 = 2.
print(4.00 / (2.0+2.0))Give the output of the following when num1 = 4, num2 = 3, num3 = 2.
num1 = 2 + 9 * ((3*12)-8)/10 print(num1)