-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwelcome.py
32 lines (25 loc) · 1.13 KB
/
welcome.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
#-----------------------------------------------
# This is a function at the beginning of the program
# to prompt the user how he/she wants to use the
# program. It includes a check for key validity
# only 'Q' or 'w' keys are valid.
# It then returns the entered valid key.
# Author: Erv
#------------------------------------------------
def welcome_func():
print("Welcome to Obsidian, a tool for cryptocurrency information.")
print("Press 'Q' to use the cryptocurrency infomation tool.")
print("Press 'W' to view a cryptocurrency from the CLI.")
print("Press 'E' to use the interest calculator.")
print("--------------------------------------------------------------")
choice = input(str("Q, W or E:"))
choice = choice.upper()
while choice !="W" and choice != "Q":
print("Invalid input, try again.")
print("Press 'Q' to view a webpage of a cryptocurrency.")
print("Press 'W' to view a cryptocurrency from the CLI.")
print("Press 'E' to use the interest calculator.")
print("--------------------------------------------------------------")
choice = input(str("Q, W or E: "))
choice = choice.upper()
return choice