Learn Python From Scratch: We Extended Our Newbie Bite Exercises From 25 to 50 🐍 πŸ“ˆ

By on 18 June 2024

We are excited to announce that we’ve extended our Newbie Bites from 25 to 50 Python exercises! πŸŽ‰

The importance of exercising when learning how to code πŸ’‘

We’re passionate about this new batch of exercises because they require active engagement, which is crucial for learning how to code. Passive methods like reading books or watching videos don’t help concepts click or stick.

Our exercises involve writing code that is validated with pytest. This immediate feedback helps you understand mistakes and learn more effectively. You’ll encounter errors, re-think your approach, and practice deliberately.

Why double the number of Newbie exercises? 🐍

The first 25 exercises taught the fundamentals well, but many found it hard to tackle the intro and beginner Bites afterward. The extra 25 Newbie Bites (#26-50) bridge the gap between complete beginners and intermediate Python programmers. πŸ’ͺ

These new exercises cover essential concepts like error handling, type hints, default arguments, special characters, working with dates, classes (!), list comprehensions, constants, exception handling, and more. πŸ’‘

We believe these challenges will provide a deeper understanding and more robust skill set to tackle the regular Bites and become more proficient in Python. πŸ“ˆ

Overview of the new exercises

Reading Errors: Learn to read and understand error messages in Python. These messages provide valuable information for debugging and fixing issues efficiently.

Failing Tests: Practice reading and interpreting failing test outputs with the pytest framework. This skill is crucial for resolving Bites and any Python development.

Type Hints: Explore type hints introduced in Python 3.5, which help you write more readable and maintainable code by specifying expected data types.

Default Arguments: Understand how to define functions with default values, making your functions more flexible and easier to use.

Special Chars: Learn about special characters in Python strings, such as \n and \t, for better formatting and readability.

Word Count: Use string methods like .split() and .splitlines() to manipulate and process text data effectively.

Dict Retrieval – Part 2: Explore advanced techniques for retrieving values from dictionaries to enhance your data handling skills.

Dict Retrieval – Part 3: Learn safer methods to retrieve values from dictionaries, providing defaults if keys are not present.

Random Module: Use Python’s random module to write a number guessing game, showcasing the practical use of standard library modules.

Working With Dates – Part 1: Explore the datetime module, focusing on the date class and the .weekday() method to work with dates.

Working With Dates – Part 2: Continue working with the datetime module, focusing on importing specific objects versus entire modules.

Make a Class: Learn about Python classes, which serve as blueprints for creating objects, starting from the basics.

Class With Str: Build upon the previous exercise by learning special methods like __str__ for adding string representations to classes.

Make Dataclass: Simplify class creation with Python dataclasses, introduced in Python 3.7.

Scope: Understand variable scope to write clearer and less error-prone code. Scope determines the visibility and lifespan of variables.

String Manipulations: Practice fundamental string manipulations, essential for processing and transforming text data.

List Comprehension: Learn to write concise and efficient list comprehensions, a powerful feature in Python for creating new lists.

Named Tuple: Explore namedtuples, which allow attribute access to elements and support type hints, enhancing your data handling capabilities.

Constants: Learn to assign and use constants, which are fixed values that improve code readability and maintainability.

Exceptions: Master exception handling to write resilient code and establish clear boundaries for function callers.

For Loop With Break And Continue: Control loop flow using break and continue statements to manage iterations based on conditions.

In Operator: Use the in operator to check for item presence in collections, a common practice in Python programming.

String Module: Combine list comprehensions with the string module to check and manipulate characters, then join them back into strings.

Formatting Intro: Learn string interpolation using the .format() method to insert variables into strings dynamically.

Formatting Intro: Learn string interpolation using the .format() method to insert variables into strings dynamically.


The exercises build upon each other, so they must be done in order. After completing them, you’ll earn your Pybites Newbie Certificate.

We’re also working on a series of screencasts to further explain the second half of the Newbie Bites. Stay tuned by subscribing to our YouTube channel.

About the Pybites Platform

We offer a rich platform for learning Python through practical exercises.

Our Bite exercises are designed to challenge you and help you apply Python in real-world scenarios, ranging from basic syntax to advanced topics.

Whether you’re a beginner or an experienced coder, our exercises aim to improve your coding skills in an effective and fun manner.

Start coding today: https://codechalleng.es/

And join our growing community of passionate Pythonistas: https://pybites.circle.so/

Want a career as a Python Developer but not sure where to start?