Halloween Sale: Flat 70% + Addl. 25% Off + 30 Days Extra Lab on all Courses | Use Coupon HS25 in Checkout | Offer Expires In
So far we have seen basic operations in Python such as addition, subtraction, multiplication, and division.
Let's see some of the advanced operations in Python
Exponentiation: **. This operator raises the number to its left to the power of the number to its right. For example, 8 ** 2 gives 64.
8 ** 2
Modulo: %. This operator returns the remainder of the division of the number to the left by the number on its right. For example, 16 % 7 equals 2 and 5 % 2 equals 1
16 % 7
5 % 2
Let's do some hands-on on exponentiation and modulo. Follow the instructions given below
Let's calculate the area of a square having one side as 4 cm. Use the below formula for calculating the area of a square
Area of a square = (side) ^ 2
Area of the square is
No hints are availble for this assesment
Answer is not availble for this assesment
Note - Having trouble with the assessment engine? Follow the steps listed