Display calendar

To display calendar of a year here,we are using a calendar function and to display a particular month of a year ,we are using a month function from calendar module of python. #import the calender module import calendar print(“To display a calender of given month”) yy=int(input(“Enter a year”)) mm=int(input(“Enter a month to be display”)) print(calendar.month(yy,mm)) … Read more

Temperature conversion

This is a python program to convert temperature from Celsius  to Fahrenheit . print(“Temperature conversion”) print(“1.celcius to fehrenheit”, “2.fehrenheit to celcius”) choice=int(input(“Enter your choice”)) if choice==1: c=int(input(“Enter temperature in celcius”)) f=(9*c)/5+32 print(f”temperature in fehrenheit is {f}”) else: f = int(input(“Enter temperature in fehrenheit”)) c = ((f-32)*5)/9 print(f”temperature in celcius is {f}”)  

Distance conversion

This is a python program to convert distance from kilometers to miles. print(” Distance conversion”) print(“1.kilometer to miles”, “2.miles to kilometer”) choice=int(input(“Enter your choice”)) if choice==1: d1=int(input(“Enter distance in kilometer”)) d2=d1*0.621371 print(f”Distance in miles is {d2}”) else: d1 = int(input(“Enter distance in miles”)) d2=d1/0.621371 print(f”Distance in kilometer is {d2}”)  

%d bloggers like this: