Skip to content

Commit 3ffec9c

Browse files
authored
Added Projects
1 parent cc63853 commit 3ffec9c

File tree

10 files changed

+154
-0
lines changed

10 files changed

+154
-0
lines changed

projects/Day_of_the_Week_Bot.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
while True :
2+
bot = input("Do you want to start the @dayoftheweekBOT(y/n)")
3+
if bot == "y" :
4+
day = int(input("Enter a day in number: "))
5+
if day == 1 :
6+
print("It's Monday")
7+
elif day == 2 :
8+
print("It's Tuesday")
9+
elif day == 3 :
10+
print("It's Wednesday")
11+
elif day == 4 :
12+
print("It's Thursday")
13+
elif day == 5 :
14+
print("It's Friday")
15+
elif day == 6 :
16+
print("It's Saturday")
17+
elif day == 7 :
18+
print("It's Sunday")
19+
else :
20+
print("Invalid number type number between(1-7)")
21+
else :
22+
print("Thanks for Using The @dayofthewwekBOT")
23+
break

projects/Tests/calculator_test.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
2+
cal = input("Do you want to use calculator(y/n): ").lower()
3+
if cal == "y":
4+
x = int(input("Enter 1st number :"))
5+
y = int(input("Enter 2nd number :"))
6+
z = (input("Which Calculation \n1.(+)\n2.(-)\n3.(x)\n4.(÷)\nEnter:"))
7+
if z == "+" or z == "1" :
8+
k = x+y
9+
print(f"Result of addition = {k}")
10+
if z == "-" or z == "2":
11+
k = x-y
12+
print(f"Result of subtraction = {k}")
13+
if z == "x" or z == "3" :
14+
k = x*y
15+
print(f"Result of multiplication = {k}")
16+
if z == "÷" or z == "4":
17+
k = x/y
18+
print(f"Result of division = {k}")
19+
else :
20+
exit("Thanks For Running Calculator")
21+
22+

projects/Tests/login_test copy.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
system = True
2+
3+
while system:
4+
x = input("Enter Your Username = ")
5+
y = input("Enter Your Password = ")
6+
7+
if x == "Douglas":
8+
print("Username Valid")
9+
if y == "abc123!@#":
10+
print("Login Successfully\nWelcome David Douglas (@admin)")
11+
system = False
12+
else:
13+
print("Invalid Password")
14+
15+
elif x == "imjohnny":
16+
print("Username Valid")
17+
if y == "jangoboy86":
18+
print("Login Successfully\nWelcome Johnny Davy (@user)")
19+
system = False
20+
else:
21+
print("Invalid Password")
22+
23+
else:
24+
print("Login Failed\nInvalid Username")

projects/Tests/login_test.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
x = input("Enter Your Username = ")
2+
y = input("Enter Your Password = ")
3+
if x == "Douglas":
4+
print("Username Valid")
5+
if y == "abc123!@#" :
6+
print("Login Successfully\nWelcome David Douglas(@admin)")
7+
else :
8+
print("Invalid Password")
9+
elif x == "imjohnny":
10+
print("Username Valid")
11+
if y == "jangoboy86":
12+
print("Login Successfully\nWelcome Johnny Davy(@user)")
13+
else :
14+
print("Invalid Password")
15+
else:
16+
print("Login Failed try again")

projects/age_checker.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
x = int(input("Enter your age: "))
2+
if x < 18 :
3+
print("TOO YOUNG")
4+
elif x <= 65 :
5+
print("You're an adult")
6+
else :
7+
print("Senior citizen")

projects/dump/test.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
print("Which Calculation \n1.(+)\n2.(-)\n3.(x)\n4.(÷)\n5.(^)\nEnter:")

projects/dump/test2.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
print("Login Successfully\nWelcome David Douglas")

projects/fake_login_system.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
system = True
2+
while system :
3+
x = input("Enter Your Username = ")
4+
y = input("Enter Your Password = ")
5+
if x == "Douglas":
6+
print("Username Valid")
7+
if y == "abc123!@#" :
8+
print("Login Successfully\nWelcome David Douglas(@admin)")
9+
system = False
10+
else :
11+
print("Invalid Password")
12+
elif x == "imjohnny":
13+
print("Username Valid")
14+
if y == "jangoboy86":
15+
print("Login Successfully\nWelcome Johnny Davy(@user)")
16+
system = False
17+
else :
18+
print("Invalid Password")
19+
else:
20+
print("Login Failed \nInvalid Username")

projects/number_guessing.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
guess = True
2+
while guess :
3+
x = int(input("Enter a number: "))
4+
if x == 40 :
5+
print("CORRECT")
6+
break
7+
if x < 40 :
8+
print("TOO LOW")
9+
if x > 40 :
10+
print("TOO HIGH")
11+
12+

projects/simple_calculator.py

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
while True :
2+
cal = input("Do you want to use calculator(y/n): ").lower()
3+
if cal == "y":
4+
x = int(input("Enter 1st number(base for '^' only ) :"))
5+
y = int(input("Enter 2nd number :"))
6+
z = (input("Which Calculation \n1.(+)\n2.(-)\n3.(x)\n4.(÷)\n5.(^)\nEnter:"))
7+
8+
if z == "+" or z == "1" :
9+
k = x+y
10+
print(f"Result of addition = {k}")
11+
elif z == "-" or z == "2":
12+
k = x-y
13+
print(f"Result of subtraction = {k}")
14+
elif z == "x" or z == "3" :
15+
k = x*y
16+
print(f"Result of multiplication = {k}")
17+
elif z == "÷" or z == "4":
18+
if y == 0 :
19+
print("can't divide by zero ❌")
20+
else :
21+
k = x/y
22+
print(f"Result of division = {k}")
23+
elif z == "^" or z == "5" :
24+
print(f"Result of division = {x**y}")
25+
else :
26+
print("Invalid Operator⚠️")
27+
else :
28+
exit("Thanks For Running Calculator")

0 commit comments

Comments
 (0)