Skip to content

Latest commit

 

History

History
69 lines (44 loc) · 1.88 KB

README.md

File metadata and controls

69 lines (44 loc) · 1.88 KB

Python Assignment

This folder contains all the task solutions to MyCaptain's Python Language workshop.

The tasks are -

  1. Write a Python program which accepts the radius of a circle from the user and compute the area.

  2. Write a Python program to accept a filename from the user and print the extension of that.

  3. Write a Python function that takes a list of words and returns the length of the longest one.

  4. Write a Python script that takes input from the user and displays that input back in upper and lower cases.

  5. Write a Python program to convert month name to the number of days. List of months: January, February, March, April, May, June, July, August, September, October, November, December

    Test Data:

    Input the name of Month: April
    

    Expected Output:

    No. of days: 30 days
    
  6. Write a Python program to check a triangle is equilateral, isosceles or scalene. Note: An equilateral triangle is a triangle in which all three sides are equal. A scalene triangle is a triangle that has three unequal sides. An isosceles triangle is a triangle with (at least) two equal sides.

  7. Write a python program to find the median of three values.

  8. Write a python function to multiply all the numbers in a list.

    Test data:

    [8, 2, 3, -1, 7]
    

    Expected Output:

    -336
    
  9. Write a python program to count the number of even and odd numbers from a series of numbers.

    Test Data:

    (1, 2, 3, 4, 5, 6, 7, 8, 9)
    

    Expected Output:

    Number of even numbers: 5
    Number of odd numbers: 4
    
  10. Write a python class named rectangle constructed by a length and width and a method which will compute the area of a rectangle.

  11. Project (Optional)