Skip to content

Commit 7a9eacf

Browse files
committed
(#68) - Update the examples
1 parent 811638e commit 7a9eacf

18 files changed

Lines changed: 188 additions & 44 deletions

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Awesome Python!
1+
# Python Tutorial
22

33
by Branimir Georgiev (www.codewithbranko.com)
44

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Use expressions to evaluate values in Python.
2+
# -----------------------------------------------------------------------------
3+
# An expression is anything that evaluates to a value. The following is true
4+
# for all expressions:
5+
#
6+
# - An expression always returns a value.
7+
# - Expressions can be used in statements (e.g. if, while, for).
8+
# - Expressions can be part of other expressions.
9+
10+
1 # Simple expression
11+
1 + 2 + 3 # Arithmetic expression
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Hello World example
2+
# ----------------------------------------------------------------------------
3+
# This is a simple example to demonstrate the most basic functionality of
4+
# Python. It prints "Hello world!" to the console and performs a simple
5+
# arithmetic operation (1 + 1).
6+
7+
print("Hello world!")
8+
print(1 + 1)

examples/junior/01-hello-world/intro_expressions.py

Lines changed: 0 additions & 2 deletions
This file was deleted.

examples/junior/01-hello-world/intro_hello_world.py

Lines changed: 0 additions & 2 deletions
This file was deleted.

examples/junior/01-hello-world/intro_import.py

Lines changed: 0 additions & 7 deletions
This file was deleted.

examples/junior/01-hello-world/intro_print.py

Lines changed: 0 additions & 16 deletions
This file was deleted.

examples/junior/01-hello-world/intro_statements.py

Lines changed: 0 additions & 2 deletions
This file was deleted.

examples/junior/01-hello-world/intro_zen_of_python.py

Lines changed: 0 additions & 3 deletions
This file was deleted.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Use import to access python modules
2+
# -----------------------------------------------------------------------------
3+
# A module is a file containing Python code. It can define functions,
4+
# classes, and variables that you can use in your code. You can import a
5+
# module using the `import` statement.
6+
7+
import math
8+
from math import pi
9+
10+
print(math.pi)
11+
print(pi)

0 commit comments

Comments
 (0)