Skip to content

Spelling and Space Complexity Issue #4

Description

@AkshayMundra19

Question - Take diameter as input and calculate the area of a circle.

diameter = int(input("Enter the value of diameter: "))
radius = diameter/2
area = 3.14 * (radius ** 2)
print("Radius of the circle is", radius)
print("Area of circle is", area)

The Code can be written like this:

Diameter = float(input("Enter the value of diameter: "))
Area = Diameter * 3.14
print ('Area: ' , Area)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions