lesson1 python
lesson1 python
3.Variable Swapping:
Swap the values of two variables x and y without using a third variable.
Example:
x = 5
y = 10
# Swap the values
Arithmetic Operations
4.Basic Calculations:
Write a program that assigns a = 15 and b = 4 and performs the following
operations:
Sum (a + b)
Difference (a - b)
Multiplication (a * b)
Division (a / b)
Floor Division (a // b)
Modulus (a % b)
Power (a ** b)
Type Conversion
Enter a number: 7
Output: The double of your number is 14
9.Find the Square:
Write a program to take a number as input from the user and print its
square.
Example: