MCPcopy Index your code
hub / github.com/geekcomputers/Python / get_select

Method get_select

BlackJack_game/blackjack_simulate.py:511–525  ·  view source on GitHub ↗
(select_max, prompt=">> ", general_err="")

Source from the content-addressed store, hash-verified

509
510 @staticmethod
511 def get_select(select_max, prompt=">> ", general_err=""):
512 while True:
513 try:
514 value = input(prompt)
515 select = int(value)
516 if select > select_max:
517 raise ValueError
518 except ValueError:
519 print(general_err)
520 continue
521 except KeyboardInterrupt:
522 print("")
523 quit()
524 else:
525 return select
526
527 def chips_manage(self):
528 if self.choice == "Insurance":

Callers 2

menuMethod · 0.95
chips_manageMethod · 0.95

Calls 1

quitFunction · 0.85

Tested by

no test coverage detected