r/learnpython • • Oct 30 '26

I know English very poorly, and it’s a bit difficult for me to understand Python syntax.

Hi everyone, I’m a beginner Python programmer, and this is my first time on Reddit. Today I spent several hours writing two simple codes and I don’t know what to do next. On the one hand, I couldn’t come up with anything creative; on the other hand, I simply don’t have enough knowledge for some of the ideas. I don’t really expect help with learning Python; I’m just sharing my thoughts. Thank you for listening.
Oh, and here’s something else — here’s one of those codes:

user_name = ""

menu = ()

chat = []

messege = ""

def append_user():

global user_name

user_name = input("Enter your nickname: ")

print(f"Welcome, {user_name}! ;)")

def main_menu():

global menu

while True:

try:

menu = int(input(" 1. Write a message\n 2. View the chat\n 3. Exit\n : "))

break

except ValueError:

print("Enter an integer (1 - 3)!")

print("Welcome to the anonymous chat!")

append_user()

main_menu()

while True:

if menu == 1:

if messege != "menu":

message = input("Enter a message: ")

twit = f"{user_name}: {message}"

chat.append(twit)

else:

main_menu()

elif menu == 2:

print(chat)

main_menu()

elif menu == 3:

break

else:

print("Enter an integer (1 - 3)!")

main_menu()

print(f"Goodbye, {user_name}, and have a good day!")

0 Upvotes

13 comments sorted by

1

u/user_bars 29d ago

Thank you all for your answers.

1

u/Far-Imagination3226 28d ago

What's your native language?? You never mentioned what language you'd need them translated into.

1

u/Far-Imagination3226 28d ago

I speak Spanish and German at ca a college level in both. I can help you with those languages, if needed.

0

u/user_bars 28d ago

russian

2

u/baubleglue Oct 30 '26

Find online some tutorials with tasks

3

u/Mathie1729 Oct 30 '26

Try finding tutorials in your native language. Python's English keywords are a pretty small set, and the syntax is the same no matter what language the explanations are in. The harder part is the logic, not the English.

2

u/TheRNGuy 29d ago

Ask AI to translate docs, if they're already not translated. 

1

u/SchemeWestern3388 29d ago

AI should be able to manage translating the strings and variables without touching the code. Be sure not to translate the keywords! There’s only 35 of them. You should know, for example that “def” is short for “define”, and what that means. 

1

u/JakeThomasDad12 29d ago

You only have to use English for the syntax, anything else like variables and strings and all sorts can be in your native language. I think python works fine with all the unicode characters (I could be wrong).

1

u/No-Formal7513 24d ago

Unpopular opinion:
Use a translator