give me some questions based on python
programming operators so that I can write a
program
Here are some programming questions focused on Python operators. You can use these
prompts to write your own programs:
Arithmetic Operators
Write a program to calculate the sum, difference, product, and quotient of two numbers
entered by the user.
Create a program that calculates the area and perimeter of a rectangle using length and
breadth as input.
Comparison Operators
Ask the user to input two numbers and display whether the first number is greater than, less
than, or equal to the second number.
Write a program that checks if a given number is even or odd using a comparison operator.
Logical Operators
Write a program that accepts an age from the user and prints whether they are eligible to
vote (age ≥ 18) and if they are a senior citizen (age ≥ 60) using logical operators.
Create a program to check if a number is divisible by both 2 and 5.
Assignment Operators
Write a program that takes a number as input and incrementally adds, subtracts, multiplies,
and divides it by another number using assignment operators (e.g., +=, -=, *=, /=).
Bitwise Operators
Write a program that takes two integers and displays their bitwise AND, OR, and XOR
values.
Input a number and display its left shift and right shift by 2 places.
Membership and Identity Operators
Check if a particular element is present in a list using a membership operator.
Given two variables pointing to objects, write a program to check if both variables refer to
the same object in memory using identity operators.
Feel free to try writing code for any of these questions to practice your use of Python operators!