Skip to content

Commit 15cf4eb

Browse files
Add files via upload
1 parent 5a97c4f commit 15cf4eb

3 files changed

Lines changed: 23 additions & 0 deletions

File tree

week_4/README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
## Conditional Statements in Python
2+
3+
Conditional statements in Python are used to make decisions in your code. They allow you to execute certain blocks of code based on whether a condition is `True` or `False`.
4+
5+
### Basic Syntax
6+
7+
The basic syntax for a conditional statement is:
8+
9+
```python
10+
if condition:
11+
# Code to execute if the condition is True
12+
elif another_condition:
13+
# Code to execute if the second condition is True
14+
else:
15+
# Code to execute if none of the above conditions are True

week_4/fifth.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
age = 20
2+
3+
if age < 18:
4+
print("You are a minor.")
5+
elif age == 18:
6+
print("You just turned 18!")
7+
else:
8+
print("You are an adult.")

week_4/leacture 05.pptx

981 KB
Binary file not shown.

0 commit comments

Comments
 (0)