Example HTML page

P-Assignment 9: Numbers and Lists

Hi,

Please do the following programs

  1. Write a python script to swap two numbers without using temp variable .
  2. Write a python script to swap two numbers using temp variable .
  3. Write a python script to print the factors of a given number.
  4. Write a python script to find the sum of the squares of elements in a list.
  5. Write a python script to find the sum of the cubes of elements in a list.
  6. Write a python script that print the sum of positive numbers and sum of negative numbers separately.
  7. Write a python script to print the largest even number in a list
  8. Write a python script to print the smallest odd number in a list
  9. Write a python script to count the average value of the elements in the list
  10. Write a python script to read two numbers and print their quotient and remainder.
  11. Write a python script to search the number of times a particular number occurs in a list.
  12. Suppose you have created a list with 6 elements.Write a python script to find largest number and second least number in that list.
  13. Write a python script to sort a list based on the length of the elements.Suppose you have created the list with the length of “4” elements. If you try to append another element i.e 5th element the error is to be displayed.
  14. Write a python script to generate random numbers from 1 to 40 and append them to a list.
  15. Write a python script to swap the first and last value of the list.

     

Example HTML page

Leave a Reply

Your email address will not be published. Required fields are marked *

Pin It on Pinterest