KnowledgeBoat Logo

Computer Science

What will be the output produced by following code fragment:


side = int(input('side') )  #side given as 7
area = side * side
print (side, area)

Python

Python Funda

39 Likes

Answer

Output

side7
7 49

Explanation

  1. side = int(input('side') ) ⇒ This statements asks the user to enter the side. We enter 7 as the value of side.
  2. area = side * side ⇒ area = 7 * 7 = 49.
  3. print (side, area) ⇒ prints the value of side and area as 7 and 49 respectively.

Answered By

19 Likes


Related Questions