August 2020 Code Challenges

Python challenges

These three Python challenges focus on Tuples, Sets Dictionaries and Strings. Create a GitHub repository with a Python file per level.

Submit your GitHub Repository to the Coding-Challenges channel in the How To Code Well Discord server.

I will review these live on Twitch at the end of August.

Level 1 - Find the duplicates in a Python Tuple

How many times is 1 duplicated in the following Tuple

1,1,2,3,4,1,5,6,7,1

For example 1 is in the Tuple 4 times

Level 2 - Find the max and min of a Python Set

Print the max and min numbers of this set

set([15, 11, 8, 15, 32, 20])

For example 8 and 32

Level 3 - Count characters in a string

Create function that counts the characters in the string;

Row Row Row Your Boat

The function should return a dictionary where the index is the character and it's value is character count.

For example {'R': 3, 'B':1}

R is found in the string 3 times, B is found in the string 1 time and so on