Skip to content

Commit 079f2de

Browse files
committed
bug fixes
1 parent f02f5e6 commit 079f2de

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

option_validator.py

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
from colorama.ansi import Fore, Style
2+
from colours import print_with_color
13
import time
24
import sys
35
from extras import load_a, load_b,clear
@@ -19,7 +21,7 @@ def options():
1921
key = int(input("Enter the key: "))
2022
print()
2123
time.sleep(1)
22-
print("--------------------------")
24+
print_with_color("--------------------------", color=Fore.YELLOW, brightness=Style.BRIGHT)
2325
load_a()
2426
ce.caesar_encryption(plaintext, key)
2527

@@ -35,21 +37,26 @@ def options():
3537
key = int(input("Enter the key: "))
3638
print()
3739
time.sleep(1)
38-
print("--------------------------")
40+
print_with_color("--------------------------", color=Fore.YELLOW, brightness=Style.BRIGHT)
3941
load_b()
4042
cd.caesar_decryption(ciphertext, key)
4143

4244
elif option == '3':
4345
time.sleep(1.5)
4446
clear()
45-
msg = "Thank you! :)\nSee you next time!"
46-
sys.exit(msg)
47+
print_with_color('[~~~~~~~~~~~~~~~~~~~~~~~~]',color=Fore.MAGENTA)
48+
time.sleep(1)
49+
print(" Thank you! :)")
50+
time.sleep(0.7)
51+
print(" See you next time!")
52+
time.sleep(0.5)
53+
sys.exit()
4754

4855
else:
4956
time.sleep(1.5)
50-
print("Invalid Option.")
57+
print_with_color("Invalid Option.", color=Fore.RED)
5158
time.sleep(0.5)
52-
print("Try again!...")
59+
print_with_color("Try again!...", color=Fore.RED)
5360
print()
5461
time.sleep(1)
5562
options()

0 commit comments

Comments
 (0)