Repository: Python-World/python-mini-projects
File: projects/Unstructured Supplemenrary  Service Data/ussdtim.py (Python)

Code before:
	    elif trnsf.isdigit( )==True and len(trnsf)>2:
	        time.sleep( 5)
	        print("wrong password.")
	        sys.exit( )
	    else:
	        time.sleep(10)
	        print("An error has occurred")
	        sys.exit( )
	        	
def funds( ):
	time.sleep(3)
	print(bank_list)
	bnk = input("Select receipients Bank:")
	acc_num= input("Entet account number:")
	print("Sending to",acc_num)
	hash= input("1.Press # to go back to options menu\n2. Press * to go exit.")
	if hash == "#":
	   options_menu( )
	elif hash == "*":
	    exit( )
	else:
														sys.exit( )											

																#--------------------------------------------------												
###i'm yet to catch an error for non -digit and more than one digit###REMINDER!!!						#-#------------------------------------------------------								
# This is the function for options.
def options_menu( ) :
	print("1. Open Account\n2. Upgrade/Migrate\n3. Balance\n4. Transfer\n5. Funds")
	choice=input("Enter an option:")
	if choice == "1":
		time.sleep(10)
		open_acct( )
	elif choice == "2":
		time.sleep(10)
		upgrade_migrate( )
	elif choice =="3":
		time.sleep(10)
		balance( )
	elif choice =="4":
		time.sleep(10)
		transf( )
	elif choice =="5":
		time.sleep(10)
		funds( )
	else:
		time.sleep(5)
		print("Not an option.")
		sys.exit( )
		
# This is the function which prompts the user as to whether the user wishes to continue or stop transaction.
def exit( ):

Review comment (suggestion):
extra space ?
```suggestion
sys.exit( )											

```

Code after:
	    if trnsf.isdigit( )!= True:
	        time.sleep(5)
	        print("Not an option")
	        sys.exit( )
	    elif trnsf.isdigit( ) and len(trnsf)>2:
	        time.sleep( 5)
	        print("wrong password.")
	        sys.exit( )
	    else:
	        time.sleep(10)
	        print("An error has occurred")
	        sys.exit( )
	        	
def funds( ):
	time.sleep(3)
	print(bank_list)
	bnk = input("Select receipients Bank:")
	acc_num= input("Entet account number:")
	print("Sending to",acc_num)
	hash= input("1.Press # to go back to options menu\n2. Press * to go exit.")
	if hash == "#":
	   options_menu( )
	elif hash == "*":
	    exit( )
	else:
														sys.exit( )											

																#--------------------------------------------------												
###i'm yet to catch an error for non -digit and more than one digit###REMINDER!!!						#-#------------------------------------------------------								
# This is the function for options.
def options_menu( ) :
	print("1. Open Account\n2. Upgrade/Migrate\n3. Balance\n4. Transfer\n5. Funds")
	select_options ={
	  '1':open_acct,
	  '2':upgrade_migrate,
	  '3': balance,
	  '4':transf,
	  '5':funds}
	choice=input("Enter an option:")
	if select_options.get(choice):
	   select_options[choice]()
	else:
		sys.exit()
		
# This is the function which prompts the user as to whether the user wishes to continue or stop transaction.
def exit( ):
	exit= input("Do you wish to make another transaction [Y/N] :")
	if exit== "N":
		sys.exit( )
	elif exit == "#":
	    options_menu( )