Skip to content

Commit c1fe093

Browse files
author
Pc
committed
update
1 parent a59f185 commit c1fe093

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

ConditionalStatement/Exercise3.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
def main():
2+
choice='z'
3+
if choice == 'a':
4+
print("You chose 'a'.")
5+
elif choice == 'b':
6+
print("You chose 'b'.")
7+
elif choice == 'c':
8+
print("You chose 'c'.")
9+
else:
10+
print("Invalid choice.")
11+
12+
if __name__ == '__main__':
13+
main()

Solutions/Excercise1.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
def main():
2+
x=11
3+
y=2
4+
print("Addition X+Y=",x+y)
5+
print("Subtraction X-Y=",x-y)
6+
print("Multiplication X*Y=",x*y)
7+
print("Division X/Y=",x/y)
8+
print("Modulus X%Y=",x%y)
9+
print("Exponent X**Y=",x**y)
10+
print("Floor Division X//Y=",x//y)
11+
12+
if __name__ == '__main__':
13+
main()

0 commit comments

Comments
 (0)