Skip to content

Commit f22760a

Browse files
committed
Day 1 - Python Basics
1 parent 6875a5f commit f22760a

File tree

4 files changed

+39
-0
lines changed

4 files changed

+39
-0
lines changed

Day 1 - Python Basics/README.md

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Day 1: Python Basics
2+
3+
## What You'll Learn:
4+
- Basic program structure
5+
- Printing to console
6+
- Variable declaration
7+
- User input handling
8+
9+
## Files:
10+
1. `hello_world.py` - Basic print statement
11+
2. `variables.py` - Variable usage examples
12+
3. `user_input.py` - Getting and using user input
13+
14+
## Exercises:
15+
1. Create a program that asks for your name and age, then prints them
16+
2. Make a currency converter from USD to EUR (hardcode rate)

Day 1 - Python Basics/hello_world.py

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Simple print statement
2+
print("Hello World!")
3+
4+
# Multi-line print
5+
print("""This is
6+
a multi-line
7+
string""")

Day 1 - Python Basics/user_input.py

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Basic input
2+
name = input("Enter your name: ")
3+
print(f"Hello, {name}!")
4+
5+
# Numeric input
6+
age = int(input("Enter your age: "))
7+
print(f"You'll be {age + 5} in 5 years")

Day 1 - Python Basics/variables.py

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Variable declaration
2+
name = "James"
3+
age = 25
4+
height = 1.75
5+
is_student = True
6+
7+
# Formatted string
8+
print(f"{name} is {age} years old")
9+
print(f"Type of age: {type(age)}")

0 commit comments

Comments
 (0)