0Pricing
Coding for Kids · Lesson

Asking the User

Read a temperature.

Talk to the User! 💬

Hi coder! 👋 So far WE picked the temperature. But what if we want the user to type their own number? 🤔

Python has a magic word for that: input()! ⌨️

print("Let's ask the user a question! 💬")

Meet input() ⌨️

input() stops the program and waits for someone to type something. ⏳

Then it gives us back whatever they typed! Let's try a name first. 😊

name = input("What is your name? ")
print("Hello", name, "👋")

All lessons in this course

  1. Celsius and Fahrenheit
  2. The Formula
  3. Asking the User
  4. Showing the Result
← Back to Coding for Kids