Advertisements
Advertisements
Question
Give the output of the following when num1 = 4, num2 = 3, num3 = 2.
num1 **= num2 + num3
Solution
num1 **= num2 + num3
The above statement can be written as
num1 **= 5
num1 = num1 ** 5
num1 = 4 ** 5
num1 = 1024
Therefore, the output will be 1024.
APPEARS IN
RELATED QUESTIONS
Which data type will be used to represent the following data values and why?
Number of months in a year
Which data type will be used to represent the following data values and why?
A resident of Delhi or not
Which data type will be used to represent the following data values and why?
Volume of a sphere
Which data type will be used to represent the following data values and why?
Perimeter of a square
Which data type will be used to represent the following data values and why?
Name of the student
Which data type will be used to represent the following data values and why?
Address of the student
Give the output of the following when num1 = 4, num2 = 3, num3 = 2.
num1 += num2 + num3
print (num1)
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 = '5' + '5'
print(num1)
Give the output of the following when num1 = 4, num2 = 3, num3 = 2.
print(4.00 / (2.0 + 2.0))