Posts

Showing posts from April, 2025

if, if else, if elif else

if whether='sunny' if whether=='sunny': print("I WILL GO OUT SIDE") if else whether=str(input("enter your whether. ")) if whether=='sunny': print("I WILL GO OUT SIDE") else: print("iwill not go out side") if elif else whether=input("enter your whether ") if whether=='sunny': print("I WILL GO OUT SIDE") elif whether=='hot': print("iwill not go out side") elif whether=='cold': print("i will play in side") else: print("sleep")

python simple program

swap to numbers with using temperory vairable a=int(input("enter a value")) b=int(input("enter b value")) a=a+b b=a-b a=a-b print(a,b) farheat to celcius f=int(input("enter value")) k=int(input("enter value")) f=k*(9/5)+32 k=273+f print("farnheat in celcius",f ) print("farnheat in celcius",k ) ruppes in dollors amount=int(input("enter amount in ruppes")) USA=amount*0.0012 print(f"rupees in dollor is {USA}")