- Write a Python program to swap two integers without using a temporary variable.
- Write a Python program to swap two integers using bitwise XOR.
- Write a Python program to reverse an integer number.
- Write a Python program to reverse a number using recursion.
- Write a Python program to check whether a number is a palindrome.
- Write a Python program to check whether a number is a palindrome without using a string.
- Write a Python program to find the sum of the digits of a number.
- Write a Python program to count the number of digits in an integer.
- Write a Python program to check whether a number is even or odd.
- Write a Python program to check even or odd using bitwise operator.
- Write a Python program to find the largest of two integers.
- Write a Python program to find the largest of three integers.
- Write a Python program to check whether a number is positive, negative, or zero.
- Write a Python program to find the factorial of a number.
- Write a Python program to calculate factorial using recursion.
- Write a Python program to check whether a number is prime.
- Write a Python program to print all prime numbers in a given range.
- Write a Python program to print the Fibonacci series up to N terms.
- Write a Python program to check whether a number is an Armstrong number.
- Write a Python program to calculate the power of a number.
- Write a Python program to find the GCD (Greatest Common Divisor) of two numbers.
- Write a Python program to find the LCM (Least Common Multiple) of two numbers.
- Write a Python program to check whether a number is a perfect number.
- Write a Python program to check whether a number is a strong number.
- Write a Python program to check whether a number is a neon number.
- Write a Python program to check whether a number is a perfect square.
- Write a Python program to check whether a number is a power of 2.
- Write a Python program to check whether a number is a Harshad number.
- Write a Python program to print all factors of a number.
- Write a Python program to find prime factors of a number.
- Write a Python program to check whether two numbers are co-prime.
- Write a Python program to find the sum of first N natural numbers.
- Write a Python program to find the sum of even numbers up to N.
- Write a Python program to find the sum of odd numbers up to N.
- Write a Python program to print the multiplication table of a number.
- Write a Python program to count even and odd digits in a number.
- Write a Python program to find the largest digit in a number.
- Write a Python program to find the smallest digit in a number.
- Write a Python program to check whether a number contains zero.
- Write a Python program to find the sum of squares of digits.
- Write a Python program to check whether a number is a happy number.
Bit manipulation questions :
These are slightly advanced and sometimes asked to check how efficiently you think.
- Write a Python program to count the number of set bits (1s) in a number.
Frequently asked questions (FAQ's):
1. What are python int programs?
These are coding problems where we use integer values to solve logical tasks like palindrome checking, prime numbers, factorial and similar problems.
2. Why are these improtant for interviews?
These questions help interviewers understand your basics how you think and how you approach problem-solving step by step.
3. Which questions should i focus on the most?
You should focus on problem like palindrome, prime numbers, factorial, fibonacci series and GCD or LCM as they are asked very frequently.
4. How many problems should i practice?
If you practice around 25 to 40 well-chosen problems and understand them properly that is usually enough for most interviews.
No comments:
Post a Comment