Code It Up - Operators
Code It Up - Operators
3. Write a program to add yours’ first and the last names and print the full
name.
firstname = input("Input your First Name : ")
lastname = input("Input your Last Name : ")
print (lastname + " " + firstname)
4. Write a program in python to find the area of a rectangle and area of a circle.
str = "hello"
print(len(str))
6. Write a python code to add three numbers, taking the value from the user.
number1 = int(input("Please first number:"))
number2 = int(input("Please second number:"))
number3 = int(input("Please third number:"))
result = (number1 + number2 + number3) / 3
print("The sum of three numbers: " , result)
7. Write a program that asks the user to enter two integers. The program output
should be the quotient and remainder when the first number is divided by second
number. For example if the first number entered was 23 and the second number
entered was 4, then the program output should be quotient = 5 and remainder = 3.
8. Write a python program to find the area of a square, taking the value of the
side of a square from the user.
side = int(input("Enter the side of the : "))
Area = side*side
print("Area of the square="+ Area)
9. Write a program that asks the user to enter two integers. Have the program
output the two integers and the result when the first number entered is raised
to the power of the second number entered.