0% found this document useful (0 votes)
2 views2 pages

Give Me Some Questions Based on Python Programming

The document provides a list of programming questions focused on various Python operators, including arithmetic, comparison, logical, assignment, bitwise, membership, and identity operators. Each section includes specific prompts for writing programs, such as calculating sums, checking number properties, and manipulating variables. These questions are designed to help users practice and enhance their understanding of Python operators.

Uploaded by

satya.apm01
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views2 pages

Give Me Some Questions Based on Python Programming

The document provides a list of programming questions focused on various Python operators, including arithmetic, comparison, logical, assignment, bitwise, membership, and identity operators. Each section includes specific prompts for writing programs, such as calculating sums, checking number properties, and manipulating variables. These questions are designed to help users practice and enhance their understanding of Python operators.

Uploaded by

satya.apm01
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

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!

You might also like