Advertisement
Toma252

4.1 square 1

Oct 16th, 2019
185
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.42 KB | None | 0 0
  1. #This program calculates circumference and area of a square#
  2. ############################################################
  3.  
  4. # The base of the square
  5. a = float(input("Enter base of a square: "))
  6.  
  7. # The circumference of the square
  8. circumference = a * 4
  9.  
  10. # The area of the square
  11. area = a * a
  12.  
  13. # Print the result
  14. print("The cirumference and area of the square are %f and %f, respectively." % (circumference, area))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement