Python Program to Print Table – Basic Python Program

Python program to print multiplication table of a number given by user. Python Program to Print Table – Basic Python Program num=int(input(“Enter a number to print it’s multiplication table:”)) temp=1 i=1 while i<=10: temp=num*i print(f”{num} * {i} = {temp}”) i+=1     Tags: Print table, python program to print tables

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}”)  

%d bloggers like this: