Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

how to get circumference from radius

import math
input=input(f'The radius of the circle is : ')
radius = int(input)
diameter = radius * 2 
area = math.pi * math.pow(radius,2) # radius**2
circumference = math.pi*(radius*2)
print(f'The radius of the circle is {radius:.4f}.')
print(f'The diameter of the circle is {diameter:.4f}.')
print(f'The circumference of the circle is {circumference:.4f}.')
print(f'The area of the circle is {area:.4f}sq.')
Comment

PREVIOUS NEXT
Code Example
Python :: how to run python file from cmd 
Python :: python string trim 
Python :: pandas apply output multiple columns 
Python :: progress bar python text 
Python :: python scope 
Python :: python uuid 
Python :: how to run fastapi with code python 
Python :: plus in python 
Python :: xpath start-with python 
Python :: how to get the parent class using super python 
Python :: How to read PDF from link in Python] 
Python :: time difference between two datetime.time 
Python :: is tuple immutable in python 
Python :: python private method 
Python :: write the output of a function in a txt file 
Python :: how can i remove random symbols in a dataframe in Pandas 
Python :: pandas read to a csv file 
Python :: python calculator file size to megabytes 
Python :: skewness removal 
Python :: post request socket python 
Python :: to string python 
Python :: python substring from end 
Python :: merge two dictionaries 
Python :: tkinter copy paste 
Python :: python array looping 
Python :: pandas.core.frame.DataFrame to pandas.core.series.Series 
Python :: py -m pip 
Python :: list of dicts 
Python :: how to do randon in python 
Python :: access class variable from another class python 
ADD CONTENT
Topic
Content
Source link
Name
9+2 =