Skip to content

CheaRitheavatey/python_self_practice_2_vatey

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Python Practice Exercises for Beginners

Python Logo

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.

Table of Contents

How to Use

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:

  1. Clone this repository to your local machine.
git clone https://github.com/joechea-aupp/python_self_practice_2.git
  1. Navigate to the exercise directory.
cd python_self_practice_2
  1. Open the Python script for the exercise you want to try in your preferred Python editor or IDE.

  2. 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!

Exercise Descriptions

Exercise 1: Print a Multiplication Table

Write a Python program to print the multiplication table of a given number using nested loops.

Exercise 2: Find the Largest Number in a List

Write a Python function to find the largest number in a given list using loops.

Exercise 3: Reverse a String

Write a Python function to reverse a given string using loops.

Exercise 4: Calculate the Sum of a 2D List

Write a Python function to calculate the sum of all elements in a 2D list.

Exercise 5: Implement a Stack using a Python Class

Create a Python class representing a stack data structure with push, pop, and isEmpty methods.

Exercise 6: Check for Palindrome

Write a Python function to check if a given string is a palindrome (reads the same forwards and backwards).

Exercise 7: Prime Numbers in a Range

Write a Python function to find all prime numbers within a given range.

Exercise 8: Fibonacci Sequence

Write a Python function to generate the Fibonacci sequence up to a given number.

Exercise 9: Find Common Elements in Lists

Write a Python function that takes two lists as input and returns a new list containing common elements between the two lists

Exercise 10: Tic-Tac-Toe Game

Create a Python class representing a Tic-Tac-Toe game. Implement methods to check for a win, make a move, and display the board.

License

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!

About

Self Practice Python Exercise for Student (CSCI/COSC 111)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%