Showing posts with label program in python to Calculate Area of Square Very easy. Show all posts
Showing posts with label program in python to Calculate Area of Square Very easy. Show all posts

Friday, December 13, 2019

Write a program in python to Calculate Area of Square

Write a program in python to Calculate Area of Square


Answer:
# Python Program - Calculate Area of Square

print("Enter 'x' for exit.");
side = input("Enter side length of Square: ");
if side == 'x':
    exit();
else:
    side_length = int(side);
    area_square = side_length*side_length;
    print("\nArea of Square =",area_square);

Featured posts

Happy Independence Day August 15th

 Here's a message for India's Independence Day (August 15th): "शुभ स्वतंत्रता दिवस! आजादी की 79वीं वर्षगांठ पर, आइए हम अपने देश...

Popular posts