File tree Expand file tree Collapse file tree 10 files changed +154
-0
lines changed
Expand file tree Collapse file tree 10 files changed +154
-0
lines changed Original file line number Diff line number Diff line change 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
Original file line number Diff line number Diff line change 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 \n 1.(+)\n 2.(-)\n 3.(x)\n 4.(÷)\n Enter:" ))
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+
Original file line number Diff line number Diff line change 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\n Welcome 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\n Welcome Johnny Davy (@user)" )
19+ system = False
20+ else :
21+ print ("Invalid Password" )
22+
23+ else :
24+ print ("Login Failed\n Invalid Username" )
Original file line number Diff line number Diff line change 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\n Welcome 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\n Welcome Johnny Davy(@user)" )
13+ else :
14+ print ("Invalid Password" )
15+ else :
16+ print ("Login Failed try again" )
Original file line number Diff line number Diff line change 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" )
Original file line number Diff line number Diff line change 1+ print ("Which Calculation \n 1.(+)\n 2.(-)\n 3.(x)\n 4.(÷)\n 5.(^)\n Enter:" )
Original file line number Diff line number Diff line change 1+ print ("Login Successfully\n Welcome David Douglas" )
Original file line number Diff line number Diff line change 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\n Welcome 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\n Welcome Johnny Davy(@user)" )
16+ system = False
17+ else :
18+ print ("Invalid Password" )
19+ else :
20+ print ("Login Failed \n Invalid Username" )
Original file line number Diff line number Diff line change 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+
Original file line number Diff line number Diff line change 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 \n 1.(+)\n 2.(-)\n 3.(x)\n 4.(÷)\n 5.(^)\n Enter:" ))
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" )
You can’t perform that action at this time.
0 commit comments