Category Python

Python Project: Rock, Paper, Scissors Game

Rock Paper Scissors Game

Last week we learned how to make a Guessing Game. This week we will look at another beginner-friendly and famous game: Rock, Paper, Scissors. The game works like this: You choose how many turns you want: best out of 3…

Python Project: Guessing Game

guessing game

This numbers guessing game is a simple game that allows you to practice many of the fundamentals of the Python language. It is a great Python project for beginners and in this article you will find not only the source…

The enumerate() function in Python

enumerate python

The enumerate() function takes two arguments: an iterable, and an optional argument start, and returns an enumerate object with an index attached to each item of the iterable. The start argument sets the number to start the count. Code Example…

The zip() function in Python

zip python

The zip() function is particularly useful for those using python to deal with data exploration. It takes any number of iterators as arguments and returns a zip object, pairing the items in each iterator together. Code Example As you can…

Duck Typing in Python

duck typing python

If it looks like a duck, swims like a duck, and quacks like a duck, then it probably is a duck. Dynamic Typed languages like Python and JavaScript have an interesting characteristic of letting an object respond to a call…

Walrus Operator in Python

walrus operator

The Walrus operator := is an assignment operator and is available since Python 3.8. It is called "walrus operator" due to its resemblance to the eyes and tusks of a walrus. The walrus operator assigns and returns a value at…

Pip and Virtual Environments with venv in Python

pip venv

Note: If you don’t know what Pip is and how to use it, read this article first: Pip: Python’s package-management system. To do serious programming in Python you need to use Virtual Environments. When developing new projects, eventually you have…