Skip to content

A collection of Python practice programs covering fundamental programming concepts, preparing beginners for advanced challenges like LeetCode.

Notifications You must be signed in to change notification settings

preranavichare01/Python-Basics-Practice

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Python-Basics-Practice

This repository contains Python practice programs covering basic concepts to help beginners strengthen their programming skills before moving on to LeetCode or other competitive coding platforms.

Topics Covered

1. Basic Programs

  • Print your name, age, and location
  • Swap two numbers
  • Find maximum of 3 numbers
  • Check even or odd number
  • Find factorial of a number
  • Generate Fibonacci series
  • Reverse a number
  • Check if number is palindrome
  • Find sum of digits of a number
  • Print multiplication table

2. String Problems

  • Count vowels and consonants
  • Check if a string is palindrome
  • Reverse a string
  • Count frequency of each character
  • Remove duplicates from string
  • Find longest word in sentence
  • Change case (upper → lower, etc.)
  • Count words in a sentence

3. List and Array Problems

  • Find max and min in list
  • Find sum and average of list
  • Count even and odd numbers
  • Reverse list manually
  • Remove duplicates
  • Sort list (ascending / descending)
  • Find 2nd largest element
  • Merge two lists
  • Separate positive and negative numbers
  • Product of all elements in list

4. Conditional & Loop Based

  • Print 1 to N numbers
  • Print all even numbers from 1 to N
  • Print all prime numbers between 1 to N
  • Find factorial using loop
  • Print pattern:

**




5. Dictionary and Set

  • Count frequency of words using dictionary
  • Find keys with maximum value
  • Merge two dictionaries
  • Remove duplicates from list using set
  • Perform union, intersection, difference of two sets

6. Functions and Recursion

  • Function to check prime number
  • Function to reverse string
  • Function to find factorial (recursion)
  • Function to find sum of digits
  • Function to calculate simple interest

7. File Handling

  • Write and read from a text file
  • Count lines and words in a file
  • Copy content of one file to another

8. Practice Challenges (Mini)

  • Calculator program
  • Guess the number game
  • Simple To-Do list (in console)
  • Temperature converter (C ↔ F)
  • Student marks analyzer (average, grade)

How to Use

  1. Clone this repository:
git clone https://github.com/reranavichare01/Python-Basics-Practice.git

About

A collection of Python practice programs covering fundamental programming concepts, preparing beginners for advanced challenges like LeetCode.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages