My issue
Write a program which does the following
Find the area of a square of side 14cm.
Also, find the cost of painting the square if the paint costs is 7$ cm/sq.
Initialize the following variables in your program and use them in the computation
s to store the length of side the square
area to store the area of the square
cost to store the cost of painting
Output area and cost to the console on separate lines.
code:
s = 14 # side length of the square
area = s ** 2 # calculate area
cost = area * 7 # calculate cost of painting
print(“Area:”, area, “sq cm”)
print(“Cost of painting: $”, cost)
help me to solve the problem
My code
# Update your code below this line
s = 14 # side length of the square
area = s ** 2 # calculate area
cost = area * 7 # calculate cost of painting
print("Area:", area, "sq cm")
print("Cost of painting: $", cost)
Learning course: Learn Data Analytics using SQL and Python
Problem Link: Cost of painting Practice Problem in Learn Data Analytics using SQL and Python - CodeChef