Welcome to the PyBites Intro Bites

Login to code If you are beyond being a Python Newbie then you'll know how to write a function and parse a string.
That said, if you are new to our platform then we challenge you to gauge your level by coding these 10 Intro Bites.
Your efforts will be rewarded as after the 10th Bite you'll earn your PyBites Beginner Certificate. Happy Coding!


Bite Tags More info /
forum

Intro Bite 01. F-strings and a simple if/else

Welcome to our Intro Bites, it's time to gauge where you are with your Python! If you are still new …

f-strings if/else

        0

Intro Bite 02. Infinite loop, input, continue and break

In this Bite we'll get you to take user input using the input builtin and see if it matches items …

break continue input

mock.patch while

        0

Intro Bite 03. Loop through a dictionary and pluralise a word

You're given a dictionary of people and the number of games they've won. Use a for loop to iterate over …

dict looping

        0

Intro Bite 04. Split and join

Split up the message on newline (\n) using the split builtin, then use the join builtin to stitch it together …

join split

        0

Intro Bite 05. Slice and dice

Take the block of text provided and strip off the whitespace at both ends. Split the text by newline (\n).Loop …

replace slicing split

string module strip

        0

Intro Bite 06. Strip out vowels and count the number of replacements

In this Bite we'd like you to loop over the characters in the large block of text (the most important …

counting regular expressions replace

string manipulation Zen of Python

        0

Intro Bite 07. Filter numbers with a list comprehension

Complete the function below that receives a list of numbers and returns only the even numbers that are > 0 …

list comprehensions modulo

        0

Intro Bite 08. Loop over a dict of namedtuples calculating a total score

In this Bite you calculate the total amount of points earned with Ninja Belts by accessing the given ninja_belts dict.You …

counting dict namedtuple

        0

Intro Bite 09. Workout dictionary lookups

In this Bite you learn how to lookup values from a dictionary or in Python: dict. You are presented with …

dict exception handling format

string manipulation ternary

        0

Intro Bite 10. Type conversion and exception handling

In this Bite you complete the divide_numbers function that takes a numerator and a denominator (the number above and below …

exception handling raise type casting

        0

We use Python 3.8