Skip to content

A collection of simple errors that beginners are likely to hit when they start writing Python.

License

Notifications You must be signed in to change notification settings

ElijahAhianyo/wtfiswronghere

 
 

Repository files navigation

Improve your Python by fixing errors

We present small code samples that have errors in them. Initially, there is only one error and it is relatively easy to spot. As we move up challenges, there are multiple errors and subtle bugs.

Why do this at all?

By working through these examples, we hope you get better at:

  • reading errors
  • debugging
  • reading and editing other people's code
  • Googling for specific issues
  • solving errors on your own

Motivation for creating this repository

We noticed that people learning new programming languages lack some foundational skills like the ability to read errors, the knowledge to self-correct their own mistakes, the skill to limit their attention to only the relevant lines of code, etc. This repository is a collection of simple errors that beginners are likely to hit when they start to write Python code. Our idea is to present exercises in which beginners can experience errors and try to solve them on their own.

This repository has been created and maintained by Qxf2 Services. Qxf2 provides QA consultancy services for startups. If you found this repository useful, please let us know by giving us a star on GitHub.

How to use this repository

We suggest you do the following

  1. Fork this repository

  2. In your terminal prompt (git bash, command prompt, etc.), navigate to each challenge directory (e.g.: 01_challenge)

  3. Run the one Python script in the challenge directory (python 01_challenge.py)

  4. It should throw an error that reads similar to the .png in the challenge directory

  5. Fix the error and rerun

  6. If all goes good, you should see the output of running fizz buzz

  7. Once you fix the issue, update the readme file in the challenge directory (01_readme.md) with:

    a. what part of the error message gave you a clue

    b. how you set about solving the issue (e.g.: I Googled XXXX that didn't help me narrow down my problem. After that, I tried Googling Python XXXX and finally ended up Googling for Python XXXX error. Then I found a page that looked promising because YYYY. Much thanks to reddit user /u/danielsgriffin for this tip!)

    c. summarize what you learned.

  8. Don't forget to commit your fixed code and updated readme

  9. Pro tip: Once you are setup, try your best to timebox each exercise to no more than 10-minutes. We recommend this tip for even rank beginners who know nearly nothing about Python!

NOTE: To get the most out of these exercises, we think beginners should use an IDE (e.g.: Visual Studio Code), use git and use one git branch per challenge. These are peripheral habits to the main exercises but they will go a long way in making you more comfortable in working with code.

About

A collection of simple errors that beginners are likely to hit when they start writing Python.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%