#๐Ÿ”’ Not Reading Input?

30 messages ยท Page 1 of 1 (latest)

rotund jungle
#

When I put in f,p,s it doesn't read it I know it's a beginner mistake because I was able to do it before but I can't remember how

tropic condorBOT
#

@rotund jungle

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

steep laurel
#

could you paste the code instead of images please

rotund jungle
#

Um. Yea one sec sorry

steep laurel
#

```python
some code
```

rotund jungle
#

Okay

#
    print('Name: ',name)
    print('Money: ',money)
    menu = input('\n|S For Shop|\n|F For Farm|\n|P For Prestige|\n|:| ').lower
    if menu == 'f':
        harvest = input("H For Harvest B For Back: ")
    elif menu == 's':
        print('shop')
    elif menu == 'p':
        print('prestige')
    else:
        print('Please Input S,P,F')
        print(menu)
tropic condorBOT
#

Hey @rotund jungle!

It looks like you pasted Python code without syntax highlighting.

Please use syntax highlighting to improve the legibility of your code and make it easier for us to help you.

To do this, use the following method:
```py
print('Hello, world!')
```

This will result in the following:

print('Hello, world!')```
You can **edit your original message** to correct your code block.
steep laurel
#
while game == 1:
    print('Name: ',name)
    print('Money: ',money)
    menu = input('\n|S For Shop|\n|F For Farm|\n|P For Prestige|\n|:| ').lower
    if menu == 'f':
        harvest = input("H For Harvest B For Back: ")
    elif menu == 's':
        print('shop')
    elif menu == 'p':
        print('prestige')
    else:
        print('Please Input S,P,F')
        print(menu)
rotund jungle
#

oh okay

steep laurel
#

on the top of my head

#

I think lower is a function, not a variable

jaunty obsidian
#

!d input

tropic condorBOT
#

input()``````py

input(prompt)```
If the *prompt* argument is present, it is written to standard output without a trailing newline. The function then reads a line from input, converts it to a string (stripping a trailing newline), and returns that. When EOF is read, [`EOFError`](https://docs.python.org/3/library/exceptions.html#EOFError) is raised. Example:

```py
>>> s = input('--> ')  
--> Monty Python's Flying Circus
>>> s  
"Monty Python's Flying Circus"
```  If the [`readline`](https://docs.python.org/3/library/readline.html#module-readline) module was loaded, then [`input()`](https://docs.python.org/3/library/functions.html#input) will use it to provide elaborate line editing and history features.

Raises an [auditing event](https://docs.python.org/3/library/sys.html#auditing) `builtins.input` with argument `prompt` before reading input...
jaunty obsidian
#

This is what u want where u ask for f p or s right?

steep laurel
#

!e

str = "test".lower
print(str)
str = "test".lower()
print(str)
tropic condorBOT
steep laurel
#

yep

rotund jungle
#

oh

#

lemme try that

#

okay that works

#

sorry for bugging ya

#

such a tiny mistake lol

steep laurel
#

that's why those channels exist, it's fine

#

just be sure you understand the why

rotund jungle
#

okay well thx

steep laurel
#

it's important

rotund jungle
#

!close

tropic condorBOT
#
Python help channel closed

This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.