Answer to Question #246929 in Python for sree

Question #246929

You are given a side of a square as input. Write a program to find the perimeter and area of the square.

Input

The input is an integer representing the length of the side of the square.

Output

The first line of the output should contain area of the square, and the second line of the output should contain the perimeter of the square as per the format shown in the sample output.

Explanation

Given the length of the side is

2. As the area of square is

side*side and the perimeter of the square is 4*side.Then output should be


1
Expert's answer
2021-10-05T23:13:56-0400
N=int(input("Enter the side of the square: "))
Area=N*N
Perimeter=4*N
print(Area)
print(Perimeter)

Sample output:

Enter the side of the square: 5

25

20


Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS