Skip to main content

Posts

Showing posts with the label Write a Python Program to Swap Between two number

ads1

Basic 15 :- Write a Python Program to Swap Between two number

  Write a Python Program to Swap Between two number  #Static """ no1 = 10 no2 = 20 print("This is the First number :-",no1) print("This is the Second number :-",no2) no1,no2 = no2,no1 print("This is the First number :-",no1) print("This is the Second number :-",no2) """ #Dynamic no1 = int(input("Enter the First number ;-")) no2 = int(input("Enter the Second number :- ")) print("This is the First number :-",no1) print("This is the Second number :-",no2) #This logic is for swapping no1,no2 = no2,no1 print("This is the First number :-",no1) print("This is the Second number :-",no2)

ads2