This repository contains a set of Python practice exercises for beginner students. These exercises cover a variety of topics, including loops, functions, data structures, and more.
- Exercise 1: Print a Multiplication Table
- Exercise 2: Find the Largest Number in a List
- Exercise 3: Reverse a String
- Exercise 4: Calculate the Sum of a 2D List
- Exercise 5: Implement a Stack using a Python Class
- Exercise 6: Check for Palindrome
- Exercise 7: Prime Numbers in a Range
- Exercise 8: Fibonacci Sequence
- Exercise 9: Find Common Elements in Lists
- Exercise 10: Tic-Tac-Toe Game
Each exercise is presented as a separate Python script. You can find the solution to each exercise in the corresponding file.
To try out an exercise, follow these steps:
- Clone this repository to your local machine.
git clone https://github.com/joechea-aupp/python_self_practice_2.git- Navigate to the exercise directory.
cd python_self_practice_2-
Open the Python script for the exercise you want to try in your preferred Python editor or IDE.
-
Run the script and observe the output or modify the code to experiment with different solutions.
Feel free to create new branches, add your own solutions, or make improvements to the existing exercises. Contributions are welcome!
Write a Python program to print the multiplication table of a given number using nested loops.
Write a Python function to find the largest number in a given list using loops.
Write a Python function to reverse a given string using loops.
Write a Python function to calculate the sum of all elements in a 2D list.
Create a Python class representing a stack data structure with push, pop, and isEmpty methods.
Write a Python function to check if a given string is a palindrome (reads the same forwards and backwards).
Write a Python function to find all prime numbers within a given range.
Write a Python function to generate the Fibonacci sequence up to a given number.
Write a Python function that takes two lists as input and returns a new list containing common elements between the two lists
Create a Python class representing a Tic-Tac-Toe game. Implement methods to check for a win, make a move, and display the board.
This project is licensed under the MIT License - see the LICENSE file for details.
Enjoy the practice! If you have any questions or feedback, feel free to open an issue or reach out to us.
Happy coding!
