Skip to content
This repository has been archived by the owner on May 29, 2024. It is now read-only.

SG7504/2nd-Internship-Projects

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 

Repository files navigation

As for the first project, the file name is Digital clock.py, I created a Digital Clock With the help of Python. The code is as follows. First I imported the required libraries for the time function and clock structure. I set a function as update_clock() with the details of the clock like Hours, Minutes and Seconds. I set this clock at 24 Hours format. I set the type with of file with name and file type. I can customize the clock according to my own convenience like picking my preferred background and foreground colors, font type, size etc. I set a loop at the end to make sure that the clock runs at an infinite loop to adjust the seconds as soon as possible and I called the function at the end.

As for the second project, the file name is Tic-Tac-Toe.py .I created a Tic-Tac-Toe game using Python. Here I created, a function to print the game board, a function to check if a player has won, a function to check if the game ends with a tie. The print_board function takes the current game board and displays it on the screen. It shows the positions where each player has placed their symbol (X or O). The check_winner function checks if a player has won the game. It looks at all the rows, columns, and diagonals on the board to see if a player has placed their symbol in three consecutive positions. The is_board_full function checks if the game board is completely filled with player symbols. If the board is full and no player has won, it's a tie. The game loop continues until someone wins or the game ends in a tie.

As for my third project during my internship, I created a snake game the file name is Snake Game.py. This Python code uses the curses library to create a basic Snake game. It sets up a game window where a snake, initially consisting of three blocks, moves around the screen. The player controls the snake's movement using arrow keys. The game also includes a piece of food represented by a special character. When the snake's head touches the food, the snake grows longer. The game continues until the snake collides with the walls or itself, ending the game. The code handles the game logic, such as updating the snake's position, detecting collisions, and placing new food when the snake eats the existing food. It provides a simple text-based representation of the classic Snake game, offering a fun and interactive experience within the terminal environment.

As for my fourth and final project during my internship, this code is for a game called Connect Four, the file have is Connect Four.py. It's a game where two players take turns dropping colored discs into a grid. The first player to get four discs in a row (horizontally, vertically, or diagonally) wins. The code creates a grid for the game, lets players take turns dropping discs, and checks if someone has won after each turn. It keeps going until someone wins or the grid is full. The game is played in the console, where players type the number of the column where they want to drop their disc. The code then updates the grid and prints it out so players can see the current state of the game.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published