Bootcamps

Explore our extensive collection of courses designed to help you master various subjects and skills. Whether you're a beginner or an advanced learner, there's something here for everyone.

Academy

Learn live

Join us for our free workshops, webinars, and other events to learn more about our programs and get started on your journey to becoming a developer.

Upcoming live events

Learning library

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

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

Full-Stack Software Developer - 16w

Data Science and Machine Learning - 16 wks

Search from all Lessons


LoginGet Started

Register to 4Geeks

← Back to Projects

Excuse Generator CLI with Javascript

Difficulty

  • easy

Average duration

3 hrs

Technologies

Difficulty

  • easy

Average duration

3 hrs

Technologies

Weekly Coding Challenge

Every week, we pick a real-life project to build your portfolio and get ready for a job. All projects are built with ChatGPT as co-pilot!

Start the Challenge

Podcast: Code Sets You Free

A tech-culture podcast where you learn to fight the enemies that blocks your way to become a successful professional in tech.

Listen the podcast

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!

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.

🌱 How to start this project?

  1. Make sure you have a Github account at: https://github.com
  2. We recommend to open this reposiory using a provisioning tool like Codespaces (recommended) or Gitpod. Alternatively you can cloning it on your local computer using the git clone command.

This is the repository you need to open or clone:

https://github.com/breatheco-de/excuse-generator-javascript-cli

👉 Please follow these steps on how to start a coding project.

  1. The exercises will start and show the instructions automatically but if you encounter any issues you can try running them manually by typing in your command line the following:
1$ learnpack start

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 built?

Excuse generator explanation

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

Hint

  1. Create an 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).

Signup and get access to similar projects

We will use it to give you access to your account.
Already have an account? Login here.

Difficulty

  • easy

Average duration

3 hrs

Technologies

Difficulty

  • easy

Average duration

3 hrs

Technologies

Difficulty

  • easy

Average duration

3 hrs

Technologies

Difficulty

  • easy

Average duration

3 hrs

Technologies

Signup and get access to similar projects

We will use it to give you access to your account.
Already have an account? Login here.

Difficulty

  • easy

Average duration

3 hrs

Technologies

Difficulty

  • easy

Average duration

3 hrs

Technologies

Weekly Coding Challenge

Every week, we pick a real-life project to build your portfolio and get ready for a job. All projects are built with ChatGPT as co-pilot!

Start the Challenge

Podcast: Code Sets You Free

A tech-culture podcast where you learn to fight the enemies that blocks your way to become a successful professional in tech.

Listen the podcast