You need to firstly type “if” and the “elif”. So it should be something like that:
def choice(game): #CHOOSING GAME while game > 3 or game < 1: print("\nSomething went wrong, enter game you want again (only numbers 1, 2, 3!") game = int(input("--> ")) if game == '1': #bug here print("You chose Coin flip game") os.system('python coinflip.py') elif game == '2': #and here print("You chose Horse racing game") os.system('python horseracing.py') elif game == '3': #and here print("You chose Loto game") os.system("python loto.py")
Related Posts:
- ‘End of statement expected’ in pycharm
- Why Am I Getting ELIF Invalid Syntax Error?
- ImportError: No module named ‘xlrd’
- ImportError: No module named ‘django.core.urlresolvers’
- Use Gif Logo For Loading Screen In Kivy
- How can I make a time delay in Python? [duplicate]
- Python – TypeError: ‘int’ object is not iterable
- Microsoft Visual C++ 14.0 is required (Unable to find vcvarsall.bat)
- Python: ‘ModuleNotFoundError’ when trying to import module from imported package
- Relative imports in Python 3
- What does the list() function do in Python?
- TypeError: not all arguments converted during string formatting python
- Process finished with exit code -1073741515 (0xC0000135)
- WinError 2 The system cannot find the file specified (Python)
- hashlib.md5() TypeError: Unicode-objects must be encoded before hashing
- Could not find a version that satisfies the requirement tensorflow
- AttributeError: ‘module’ object has no attribute ‘urlopen’
- Python Error: AttributeError: __enter__ [duplicate]
- filedialog, tkinter and opening files
- error UnicodeDecodeError: ‘utf-8’ codec can’t decode byte 0xff in position 0: invalid start byte
- Error in Python script “Expected 2D array, got 1D array instead:”?
- Error: ” ‘dict’ object has no attribute ‘iteritems’ “
- Pycharm exit code 0
- ‘python3’ is not recognized as an internal or external command, operable program or batch file
- How to upgrade pip3?
- Name ‘xrange’ is not defined in Python 3 [duplicate]
- SystemError: Parent module ” not loaded, cannot perform relative import
- Error: ” ‘dict’ object has no attribute ‘iteritems’ “
- TypeError: ‘<=' not supported between instances of 'str' and 'int' [duplicate]
- TypeError: unsupported operand type(s) for -: ‘str’ and ‘int’
- How to upgrade pip3?
- How to Read .txt in Pandas
- TypeError: cannot convert the series to
- Pinging servers in Python
- What is the difference between Anaconda and Pycharm?
- Add Legend to Seaborn point plot
- How to pass arguments to a Button command in Tkinter?
- How to remove specific substrings from a set of strings in Python?
- Change figure size and figure format in matplotlib
- How can I concatenate str and int objects?
- error: Failed to load the native TensorFlow runtime
- ImportError: No module named ‘encodings’
- TypeError(“‘bool’ object is not iterable”,) when trying to return a Boolean
- Python: create a pandas data frame from a list
- PermissionError: [WinError 5] Access is denied
- How to delete last item in list?
- Don’t understand this SyntaxError: illegal target for annotation
- Using Queue in python
- TypeError(“‘bool’ object is not iterable”,) when trying to return a Boolean
- Converting int to bytes in Python 3
- How to get the current working directory using python 3?
- min() arg is an empty sequence
- “for line in…” results in UnicodeDecodeError: ‘utf-8’ codec can’t decode byte
- SyntaxError invalid token
- For loop and ‘numpy.float64’ object is not iterable error
- python mpl_toolkits installation issue
- python install wheel leads to import error
- Python sockets error TypeError: a bytes-like object is required, not ‘str’ with send function
- Pipenv: Command Not Found
- TypeError: ‘dict_keys’ object does not support indexing
- ImportError: No module named ‘bottle’ – PyCharm
- How to strip all whitespace from string
- Python Binomial Coefficient
- Pip – Fatal error in launcher: Unable to create process using ‘”‘
- How to convert ‘binary string’ to normal string in Python3?
- Error: OOM when allocating tensor with shape
- Properly formatted multiplication table
- python3 TypeError: ‘function’ object is not iterable
- How to start from second index for for-loop
- How to remove project in PyCharm?
- How to fix ModuleNotFoundError: No module named ‘pip._internal’ with python source code installation
- Python Error – TypeError: input expected at most 1 arguments, got 3 [duplicate]
- A general tree implementation?
- Process finished with exit code 139 (interrupted by signal 11: SIGSEGV)
- How to compare individual characters in two strings in Python 3
- ModuleNotFoundError: No module named ‘seaborn’ in Python IDE
- Is there a ceiling equivalent of // operator in Python?
- Need to install urllib2 for Python 3.5.1
- Moving Average Pandas
- TypeError: ‘set’ object does not support indexing
- Root mean square of a function in python
- matplotlib: plot multiple columns of pandas data frame on the bar chart
- pip throws TypeError: parse() got an unexpected keyword argument ‘transport_encoding’ when trying to install new packages
- What is the purpose of dollar sign in this Python3 string formatting expression?
- How to know/change current directory in Python shell?
- What is an easy way to implement fprintf in python?
- How to use cmp() in Python 3?
- Generator expression must be parenthesized if not sole argument
- Does python have header files like C/C++?
- How to install NumPy for Python 3.6
- Error: No module named ‘fcntl’
- Python can’t find file
- TypeError: fit() missing 1 required positional argument: ‘y’
- TypeError: got multiple values for argument
- IOError: [Errno 32] Broken pipe when piping: `prog.py | othercmd`
- How do you switch between python 2 and 3, and vice versa?
- Iterating over dictionary items(), values(), keys() in Python 3
- Python webbrowser.open() to open Chrome browser
- Undefined variable error in function
- TensorFlow: how is dataset.train.next_batch defined?