About us

Learning library

For all the self-taught geeks out there, here our content library with most of the learning materials we have produces throughout the years.

It makes sense to start learning by reading and watching videos about fundamentals and how things work.

Machine Learning Engineering (16 weeks)

Full-Stack Software Developer

Search from all Lessons

Social & live learning

The most efficient way to learn: Join a cohort with classmates just like you, live streams, impromptu coding sessions, live tutorials with real experts, and stay motivated.

From zero to getting paid as a developer, learn the skills of today and tomorrow. Boost your professional career and be hired by a technology company.

Start Coding

← Back to Projects

The Excuse Generator CLI (python)

Goal

4Geeks Coding Projects tutorials and exercises for people learning to code or improving their coding skills

Difficulty

beginner

Repository

Click to open

Video

Not available

Live demo

Not available

Average duration

4 hrs

Technologies

alt text The Excuse Generator CLI (in python)

Disneyland for procrastinators and lazy people.

This project is ideal to are avoiding someone annoying, it takes no more than 20 lines of code and it can save you for the rest of your life!

this exact same picture

The Goal

We wanted a project that used very little Python but still with a very fun application, the excuse generator takes 20 lines of code, is super simple to understand and is the perfect first-ish project for any beginner developer.

Instructions

Please create a python script that generates an excuse each time it is runned.

Discuss with your classmates the strategy first

How can we generate an excuse? How are sentences build?

Excuse generator explanation

The idea is to generate each part of the sentence randomly to come up with great excuses!

🌱 How to start this project

Do not clone this repository.

  1. The first step to start coding is cloning the python boilerplate on your local computer or gitpod.

a) If using Gitpod (recommended) you can clone the boilerplate by clicking here.

b) If working locally type the following command from your command line:

1git clone https://github.com/4GeeksAcademy/flask-rest-hello`.
  1. Run the app by typing on the terminal:
1$ python3 app.py

💡 Important: Remember to create a new repository, update the remote (git remote set-url origin <your new url>), and upload the code to your new repository using add, commit and push.

Hint

  1. Create a app.py file with one excuse hard-coded in one variable.
  2. The excuse must be in a variable:
1excuse = 'The dog eat my homework when I finished'
  1. Using python, create a function that generates and returns a random excuse with the following structure:
1who = ['the dog','my granma','his turtle','my bird'] 2what = ['eat','pissed','crushed','broked'] 3when = ['before the class','right in time','when I finished','during my lunch','while I was praying']
  1. To create a consistent excuse you have to concatenate one item from each array in the proper order.
  2. Print the excuse on the console using the print function.

Technologies

Python.

Fundamentals

This exercise covers the following fundamentals:

  1. Running python files.
  2. How to work with Lists (arrays).
  3. Generating random numbers.
  4. Concatenating strings.
  5. Using functions (at least a bit).

Goal

4Geeks Coding Projects tutorials and exercises for people learning to code or improving their coding skills

Difficulty

beginner

Repository

Click to open

Video

Not available

Live demo

Not available

Average duration

4 hrs