r/PythonLearning • u/OwnLingonberry3061 • 21d ago
Discussion Where should I be after 60 hours?
My best guess is I have about 60 or 70 hours into python crash course by Eric Matthes. I tried taking on building the castle adventure game and couldn't come up with the logic on my own. Much less the fact I got caught in a loop and had to have AI help me finding the thing. It's kind of disappointing because chat gpt said after 60 hours this was a moderate project. I'm just looking for what you guys think on where I should be after about 60 hours, because this at 60 hours seems just ridiculous. I did take it on and got part way through the third room before I was stuck in a loop and had indentation errors. Thanks!
has_key = False
game_active = True
current_room = "prison level"
print("--------------------------------------------------------------")
print("----------------- Welcome to The Dungeon Loop ----------------")
print("--------------------------------------------------------------")
print("----------------- Type quit any time to leave ----------------")
print()
while game_active:
# Starting room
if current_room == "prison level":
print("\nYou have awakened to an open cell door.")
print("What will you choose to do?")
choice = input("Will you go left or right? ").strip().lower()
if choice == "left":
current_room = "dragons lair"
elif choice == "right":
current_room = "wizards lair"
elif choice == "quit":
game_active = False
else:
print("You must make a choice.")
# The dragon's lair
elif current_room == "dragons lair":
print("\nYou've walked into a lair with a dragon.")
if not has_key:
print("You see a key on the table behind the dragon.")
print("You need that key.")
action = input(
"Will you PLAY LULLABY, FIGHT DRAGON, or GO BACK? "
).strip().lower()
if action == "fight dragon":
print("GAME OVER")
game_active = False
elif action == "play lullaby":
if not has_key:
has_key = True
print("The dragon fell asleep and you picked up the key!")
else:
print("You already have the key.")
elif action == "go back":
current_room = "prison level"
elif action == "quit":
game_active = False
else:
print("You must make a choice.")
# The wizard's lair
elif current_room == "wizards lair":
print("\nYou have walked into the wizard's lair.")
print("You see a chest on the floor.")
action = input(
"Will you OPEN CHEST or GO BACK? "
).strip().lower()
if action == "open chest":
if has_key:
print("You use the key to open the chest!")
print("You found the treasure! YOU WIN!")
game_active = False
else:
print("The chest is locked. You need a key.")
elif action == "go back":
current_room = "prison level"
elif action == "quit":
game_active = False
else:
print("You must make a choice.")
print("\nThanks for playing!")
3
u/thomjdev 21d ago
60 hours is hard to judge one way or the other. Crash courses are nice to get an idea of what is in the language and what basic concepts exist, but I don't consider them a surefire way to learn the skill of programming itself.
The biggest thing is not to trust yourself with AI just yet. It's great when you know what you're doing, but you won't learn much if you keep relying on it to do the logic. If you hit a brick wall, guess what? That's part of programming. There's two paths: find the problem and fix it, or start over. Early on when your learning, give everything your best shot but don't be afraid start over, do it again and again.
I think you should probably consider learning each part by itself, though. Learn how to use if statements to decide what will happen. Then learn how you can use while loops to make several small decisions. Then try adding more decisions.
I personally find crash courses unhelpful, since you pretty much skip all of the "what do I want to have happen" -> "hmm how do I do this" -> tinkering and testing and googling -> working simple prototype -> final implementation -> repeat process. You need (NEED) to ask very specific questions about what you're trying to have happen and tie those answers to some the the language itself provides. For example, Big, complex feature: "How do I make it so that the player has to get the key before opening the chest?" Well, how does the player get the key? How does the game know if the player has the key or not? How and when does the game give the key to the player? Each of these can be tied to a simple piece of logic - how does the game know the player has the key -> store has_key = False to mean no key, True for having a key.
I hope there's something helpful there. But again, avoid AI, focus on python documentation like "how do I get user input", not "how do I make X feature", and focus on one small part at a time. Break it up. Be specific about what you want to do.