Learn practical skills, build real-world projects, and advance your career
Created 3 years ago
Write a Python program to get the Python version you are using
import platform
print(platform.python_version())
3.7.8
Write a Python program to display the current date and time.
Sample Output :
Current date and time :
2014-07-05 14:34:14
import datetime
now = datetime.datetime.now()
print ("Current date and time : ")
print (now.strftime("%Y-%m-%d %H:%M:%S"))
Current date and time :
2021-06-21 18:23:01
Write a Python program which accepts the radius of a circle from the user and compute the area. Go to the editor
Sample Output :
r = 1.1
Area = 3.8013271108436504