From f754e10c0cea7c1d3c5b17d4c5b38fa2f00077dc Mon Sep 17 00:00:00 2001 From: "Mr. W" Date: Wed, 9 Sep 2026 12:53:44 -0500 Subject: [PATCH] Your starter files --- README.md | 33 +++++++++++++++++++++++++++++++++ hello.py | 14 ++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 README.md create mode 100644 hello.py diff --git a/README.md b/README.md new file mode 100644 index 0000000..a762c3d --- /dev/null +++ b/README.md @@ -0,0 +1,33 @@ +# My Python programs + +## In class + +```bash +git clone https://git.classproject.dev/__STUDENT__/python.git +cd python +python3 hello.py +``` + +Saving your work: + +```bash +git add . +git commit -m "say what you changed" +git push +``` + +## At home + +You don't need your class laptop. Go to +**https://git.classproject.dev/__STUDENT__/python**, sign in, and edit files +right in the browser. + +To actually *run* Python at home you need Python installed — but you can read +and edit your programs from anywhere. + +## Reading an error + +When something goes wrong, Python tells you two useful things: the **line +number** and the **kind** of error. Read those two before you change anything. + +Running the same broken program again does not fix it. diff --git a/hello.py b/hello.py new file mode 100644 index 0000000..3957ed2 --- /dev/null +++ b/hello.py @@ -0,0 +1,14 @@ +# Your first program. Run it with the play button, or in the terminal: +# +# python3 hello.py + +print("Hello!") + +name = input("What is your name? ") +print("Nice to meet you, " + name) + +# int(input(...)) is one thing, not two. input() always hands back text, +# even when someone types a number, and you cannot do maths with text. +# Wrapping it in int() turns that text into a number. +age = int(input("How old are you? ")) +print("Next year you will be", age + 1)