Skip to content

Commit cec684a

Browse files
Add files via upload
1 parent 50c9237 commit cec684a

File tree

3 files changed

+31
-0
lines changed

3 files changed

+31
-0
lines changed

Diff for: Creating our function.py

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# creating our function (hello)
2+
def hello():
3+
print("hello, world")
4+
5+
#printing our function
6+
hello()

Diff for: If else statement.py

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
age = int(input("What is your age: "))
2+
if age <= 18:
3+
print("You are too small to drive")
4+
elif 70 < age:
5+
print("You are too old to drive")
6+
else:
7+
print("You can drive")

Diff for: Match and cases.py

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
day = int(input("Enter a number to guess the day: "))
2+
match day:
3+
case (1):
4+
print("Monday")
5+
case(2):
6+
print("Tuesday")
7+
case(3):
8+
print("Wednesday")
9+
case(4):
10+
print("Thursday")
11+
case(5):
12+
print("Friday")
13+
case(6):
14+
print("Saturday")
15+
case(7):
16+
print("Sunday")
17+
case _:
18+
print("there are only 7 days")

0 commit comments

Comments
 (0)