Only Few Seats Left for Advanced Certification Courses on Data Science, ML & AI by E&ICT Academy IIT Roorkee
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
64
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
2
5 % 2
1
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 here
Loading comments...