ℹ️  This repo contains questions and exercises to learn and practice Python
đź“Š Â There are currently 77 exercises and questions
- Exercises
- Questions
Name | Objective & Instructions | Solution | Comments |
---|---|---|---|
Hello World! | Exercise | Solution](solutions/hello_world/hello_world.md | |
Python Characteristics | Exercise | Solution | |
What is the result? - Level 1 | Exercise | Solution | |
What is the result? - Level 2 | Exercise |
Name | Objective & Instructions | Solution | Comments |
---|---|---|---|
Objects 101 | Exercise | Solution | |
Data Types? I know a few | Exercise | Solution | |
Choose a Data Type - level 1 | Exercise | Solution | |
Choose a Data Type - level 2 | Exercise | Solution | |
Mutability | Exercise | Solution | |
Strongly Typed | Exercise | Solution | |
Object Creation | Exercise | Solution |
Name | Objective & Instructions | Solution | Comments |
---|---|---|---|
Valid Names | Exercise | Solution | |
Locations or Names | Exercise | Solution | |
Types | Exercise | Solution | |
Multiple Value Assignment | Exercise | Solution | |
Copying Variables | Exercise | Solution | |
Mutable Objects | Exercise | Solution |
Name | Objective & Instructions | Solution | Comments |
---|---|---|---|
True or False? | Exercise | Solution | |
Conversion | Exercise | Solution |
Name | Objective & Instructions | Solution | Comments |
---|---|---|---|
22 times | Exercise | ||
Variables | Exercise | Solution | |
What is the result? - Level 1 | Exercise | Solution | |
What is the result? - Level 2 | Exercise | Solution | |
Starts with a letter | Exercise | Solution | |
Change Strings | Exercise | Solution | |
All Digits | Exercise | Solution | |
Removing Characters | Exercise | Solution | |
Reverse a String | Exercise | Solution | |
Compress Strings | Exercise | ||
Slicing - Level 1 | Exercise | Solution | |
Slicing - Level 2 | Exercise | Solution |
Name | Objective & Instructions | Solution | Comments |
---|---|---|---|
What is the result? | Exercise | Solution | |
Operations - Level 1 | Exercise | Solution | |
Operations - Level 2 | Exercise | Solution | |
Bases | Exercise | Solution | |
Palindrome | Exercise | Solution |
Name | Objective & Instructions | Solution | Comments |
---|---|---|---|
Access List Items | Exercise | Solution | |
Equal Lists | Exercise | Solution | |
Length | Exercise | ||
Append & Insert | Exercise | Solution | |
Min Max | Exercise | Solution | |
Three Biggest Items | Exercise | Solution | |
What is the result? - Level 1 | Exercise | Solution | |
What is the result? - Level 2 | Exercise | Solution |
Name | Objective & Instructions | Solution | Comments |
---|---|---|---|
Facts Only | Exercise | Solution |
Name | Objective & Instructions | Solution | Comments |
---|---|---|---|
Break Out | Exercise | Solution | |
Break Out 2 | Exercise | Solution | |
Every character | Exercise | Solution | |
Stream of Numbers | Exercise | Solution | |
Refactor-1 | Exercise | Solution |
Name | Objective & Instructions | Solution | Comments |
---|---|---|---|
My First Function | Exercise | Solution | |
Calculator | Exercise | Solution | |
First Class Objects | Exercise | Solution |
Name | Objective & Instructions | Solution | Comments |
---|---|---|---|
Classes 101 | Exercise | Solution | |
Attributes | Exercise | Solution |
Name | Objective & Instructions | Solution | Comments |
---|---|---|---|
Inheritance | Exercise | Solution |
Name | Objective & Instructions | Solution | Comments |
---|---|---|---|
Length Magic Method | Exercise |
Name | Objective & Instructions | Solution | Comments |
---|---|---|---|
Calculator Unit Tests | Exercise | Solution | |
Fix Calculator Unit Tests | Exercise |
Name | Objective & Instructions | Solution | Comments |
---|---|---|---|
Dividing by Zero | Exercise | Solution | |
What exception is raised? - Level 1 | Exercise | Solution | |
What exception is raised? - Level 2 | Exercise | Solution |
Name | Objective & Instructions | Solution | Comments |
---|---|---|---|
Substitute Strings | Exercise | Solution |
Name | Objective & Instructions | Solution | Comments |
---|---|---|---|
Read a File | Exercise | ||
Reverse a file | Exercise | ||
Print specific line | Exercise |
Name | Objective & Instructions | Solution | Comments |
---|---|---|---|
File exists | Exercise | ||
Print all the files in a directory | Exercise |
Name | Objective & Instructions | Solution | Comments |
---|---|---|---|
If True | Exercise | Solution | |
Walrus | Exercise | Solution | |
Vowel Letters | Exercise | Solution |
Name | Objective & Instructions | Solution | Comments |
---|---|---|---|
Type Hinting Facts Only | Exercise | Solution | |
Pros & Cons | Exercise | Solution | |
Type Hinting 101 | Exercise | Solution | |
Type Hinting 102 | Exercise | Solution |
Name | Objective & Instructions | Solution | Comments |
---|---|---|---|
Random Number | Exercise | ||
Random Item | Exercise |
How to print "Hello World"?
print("Hello World")
Define a class that does nothing
class SomeClass:
pass
True or False? If c
is an instance of a class, then in c.x = 1
, x
is a variable of the value 1
False. x
is an attribute in the case c.x = 1
True or False? Every object in Python has attributes
True. You can think on attributes as private dictionaries but instead of accessing them with []
or .get
, they are accessed by using a dot.