-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
55 lines (43 loc) · 1.71 KB
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#THALA FOR A REASON Calculator by SIDDHESH UMESH SARANG
# STRING:-
def check_input(userInput):
userInput = userInput.lower()
if len(userInput) == 7:
print("Your inputted string is 7 Characters long. Hence,")
print("THALA FOR A REASON")
elif "seven" in userInput:
print("Your Inputted String has word 'Seven'. Hence,")
print("THALA FOR A REASON")
elif "7" in userInput:
print("Your Inputted String has Number '7'.Hence,")
print("THALA FOR A REASON")
elif sum(ord(c) for c in userInput) == 7:
print("Your inputted String has 7 ASCII Value. Hence,")
print("THALA FOR A REASON")
elif len(userInput.split()) == 7:
print("Your inputted String has exactly 7 words. Hence,")
print("THALA FOR A REASON")
elif "dhoni" in userInput:
print("Your inputted String has 'Dhoni'. Hence,")
print("THALA FOR A REASON")
elif "ms" in userInput:
print("Your inputted String has 'MS'. Hence,")
print("THALA FOR A REASON")
elif "thala" in userInput:
print("Your inputted String has 'THALA'. Hence,")
print("THALA FOR A REASON")
else:
print("OoPs!\nNO THALA FOUND, KINDLY ENTER A DIFFERENT STRING")
userInput = input("ENTER THE STRING HERE: ")
check_input(userInput)
# GUI(Under Development):-
# import tkinter as tk
# root = tk.Tk()
# root.title("THALA Calculator")
# entry = tk.Entry(root, width=40)
# entry.pack(pady=10)
# check_button = tk.Button(root, text="Check", command=check_input)
# check_button.pack(pady=5)
# result_label = tk.Label(root, text="", width=40, height=2)
# result_label.pack(pady=20)
# root.mainloop()