Skip to main content

Unit 2 · Python mode... Activate! · Lesson 24 of 57

Python Mode: Activated

Python mode: activated!

Look at you! At the start of this unit, you could print Hello World! and that was about it.

Now you can:

  • Store stuff in variables (strings, integers, floats and bools)
  • Make your own functions, and actually understand what return does
  • Tell the difference between showing something to you (print) and sending it back to the code (return)
  • Ask the user for input, and turn it into a number when you need to
  • Glue strings together with +, and save yourself the pain with f-strings
  • Split a pizza five ways with // and %

And you helped Amer make the worst password generator ever made. Proud of you.

Quiz time!

Let's see if it stuck.

Knowledge check

A few questions on what the lesson covered. Create a free account to do this part.

Do this lesson for real

With a free account you get the terminals, challenges and checks that go with the lessons in Intro to Python, and your progress is saved as you go. CyberAcad is a 501(c)(3) nonprofit, so there is nothing to pay.