Skip to content

KaustubhSN12/Python_Exercises_Collection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

5 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🐍 Python Practice Exercises – Learning Repository

This repository is a collection of Python practice exercises designed to strengthen your programming concepts.
It covers basic input/output, loops, conditionals, string manipulation, lists, and functions, making it ideal for beginners and intermediate learners.


πŸ“Œ Categories of Exercises

πŸ”Ή Basic Programs

  1. Enter number from user and convert meter to centimeter.
  2. Write a program to calculate area of triangle.
  3. Write a program to enter a number from the user and check whether it is divisible by 7 or not.
  4. Write a program to enter nth number from the user and print sum of square of number using while loop.
  5. Print odd and even numbers series using loop (for/while loop).
  6. Accept number from user and check whether it is prime or not.

πŸ”Ή String Programs

  1. Accept string from user and reverse the string.

  2. Write a program that accepts a sentence and calculates the number of upper case letters and lower case letters.

    Example Input:
    Hello world!

    Output:

    UPPER CASE 1
    LOWER CASE 9
    

πŸ”Ή List Programs

  1. Write a program to accept n integer numbers in List, calculate and display the sum of elements from the list.
  2. Sort the elements from the list in ascending order.
  3. Accept n integer elements in list and display all elements from the list using while loop.

πŸ”Ή Function Programs

  1. Write a program that calculates the squares of numbers ranging from one to 11 using a user-defined function.
  2. Write a program that can multiply all the numbers in a list using an inbuilt function (passing parameter to function).
  3. Create a function named water_supply that will calculate how many liters a given person would need to drink in their whole life.
    • Takes two arguments: age (life expectancy) and amount (daily intake of water).
    • Formula: age * 365 * amount
    • Default values: age=75, amount=2.

🎯 Purpose

The purpose of this repository is to create a hands-on learning environment for Python learners. By solving these exercises, you will strengthen your problem-solving ability, logical thinking, and coding efficiency.


πŸ“š How to Use This Repository

  1. Clone this repo:
    git clone https://github.com/KaustubhSN12/Python-Practice-Exercises.git
  2. Open the exercises and try solving them one by one.
  3. Run and test solutions in your preferred Python environment (IDLE, Jupyter Notebook, PyCharm, VSCode).

πŸ”— Explore My Other Repositories


🀝 Contributions

Contributions are welcome! Feel free to fork the repo, add new exercises, or enhance existing ones and create a pull request.


πŸ“œ License

This project is licensed under the MIT License – free to use and share with credit.


✨ Star this repository if you find it useful and keep practicing Python!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published