├── Python program to swap two variables.py ├── README.md └── addition /Python program to swap two variables.py: -------------------------------------------------------------------------------- 1 | # Python program to swap two variables 2 | 3 | x = 5 4 | y = 10 5 | 6 | # To take inputs from the user 7 | #x = input('Enter value of x: ') 8 | #y = input('Enter value of y: ') 9 | 10 | # create a temporary variable and swap the values 11 | temp = x 12 | x = y 13 | y = temp 14 | 15 | print('The value of x after swapping: {}'.format(x)) 16 | print('The value of y after swapping: {}'.format(y)) 17 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # python_basics 2 | this repository is created to upload my basic level python programm. 3 | -------------------------------------------------------------------------------- /addition: -------------------------------------------------------------------------------- 1 | num1 = 5 2 | num2 = 5 3 | sum = num1+ num2 4 | print("the sum of two numbers;num1, num2, sum") 5 | --------------------------------------------------------------------------------