Posts

Showing posts from May, 2023

Basic Programming in Python

Image
  '''#1.Display hello world print("Hello world")''' '''#2. Data types i=(5) f=(6.13665665454545) c="a" print(i,f,c)''' '''#3.Basic calculator a=float(input("Enter the value of a=")) b=float(input("Enter the value of b=")) add=print("Addition=",a+b) sub=print("Subtraction=",a-b) mul=print("Multiplication=",a*b) div=print("Division=",a/b)''' '''#4. Volume of cube a=int(input("Enter the value=")) volume=print("Volume of cube=",a*a*a)''' '''#5.Swaping the number using the third variable a=6 b=7 c=0 print("Before Swapping a=",a,"b=",b) c=a a=b b=c print("After Swapping a=",a,"b=",b)''' ''''#6. Check no. is odd or even a=int(input("Enter the value=")) if(a%2==0):     print(a,"is an Even number") else: