Posts

Showing posts from June, 2021

PYTHON OPERATORS WITH PRACTICAL

Image
PYTHON OPERATORS : WATCH VIDEO FOR DETAIL EXPLANATION       Operators in general are used to perform operations on values and variables in Python. These are standard symbols used for the purpose of logical and arithmetic operations. In this article, we will look into different types of Python operators. Arithmetic operators:  Arithmetic operators are used to perform mathematical operations like addition, subtraction, multiplication and division. Operator Description Syntax + Addition: adds two operands x + y - Subtraction: subtracts two operands x - y * Multiplication: multiplies two operands x * y / Division (float): divides the first operand by the second x / y // Division (floor): divides the first operand by the second x // y % Modulus: returns the remainder when first operand is divided by the second x % y ** Power : Returns first raised to power second x ** y    EXAMPLE:   a = 9 b = 4     # Addition of numbers  add = a + b      # Subtraction of numbers  sub = a - b      # M

BUILD SNAKE GAME USING PYTHON (SORCE CODE )

Image
🐍🐍CREATE SNAKE GAME USING PYTHON :  A snake game is an  arcade maze game  which has been developed by Gremlin Industries and published by Sega in October 1976. It is considered to be a skillful game and has popularized among people for generations. The snake in the Snake game is controlled using the four direction buttons relative to the direction it is headed in. The player’s objective in the game is to achieve maximum points as possible by collecting food or fruits. The player loses once the snake hits the wall or hits itself. For the python beginners, those who are interested in making something easier in your domain can definitely try this out and the module  Turtle  was made exactly for this purpose for the beginners to try out and can also submit as a part of the project. This program will be done in  Python 3 . So, we will be creating a  Python-based-game  using the following modules: Turtle:  It is a pre-installed python library that enables users to create shapes and picture