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

Python Practice Questions

The document contains a list of programming practice questions focused on basic algorithms and number manipulation. Tasks include calculating averages of odd and even numbers, checking for prime numbers, displaying multiplication tables, identifying Armstrong numbers, reversing integers, generating a series based on a given algorithm, and finding the next perfect square. Each question is designed to enhance programming skills and understanding of mathematical concepts.

Uploaded by

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

Python Practice Questions

The document contains a list of programming practice questions focused on basic algorithms and number manipulation. Tasks include calculating averages of odd and even numbers, checking for prime numbers, displaying multiplication tables, identifying Armstrong numbers, reversing integers, generating a series based on a given algorithm, and finding the next perfect square. Each question is designed to enhance programming skills and understanding of mathematical concepts.

Uploaded by

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

Practice Questions

1. WAP to enter 10 numbers and find and display average


of odds and evens separately.
2.

2. WAP to enter a number and check if it is prime or not.


2.1 WAP to display all primes less than 100
2.2 WAP to display first 50 primes.

3. WAP to enter as many positive numbers. End the loop if 0


or negative is entered. Finally display the average of all
entered positive numbers.

4. WAP to display a multiplication table upto 10 for a user


input number.

5. Display all Armstrong numbers from 1 to 1000. An


Armstrong number is one whose sum of cubes of its digits is
equal to the number. For eg. 371 = 33+73+13
6. Write a program to reverse an integer and print it.
Eg. Input Output
51 15
849 948
-512 -215
7. Consider the following algorithm:
 Start with a positive number n
 if n is even then divide by 2
 if n is odd then multiply by 3 and add 1
 continue this until n becomes 1
Input a positive number and generate the series given above.
8. Enter a number and find the next perfect square number.
Eg. Next perfect square of 5 is 9, 20 is 25, 36 is 49, 0 is 1, -9 is 0.

You might also like