r/PythonLearning • • Aug 16 '25

Beginner, been learning off and on for a little bit, Made this project

Post image
105 Upvotes

32 comments sorted by

19

u/MillyTHECHAOS Aug 16 '25

Suggestion.

Instead of empty inputs you can put text in input

Also as far as i know capitalize 'Career' is used for classes for args use lowercase 'career'

And you can use print(f"text {arg}") same for print(len(name))

name = input("What is your name? ")

print(f"It is nice to meet you, {name}")

print(f"The lenght of your name is: {len(name)}")

6

u/Acceptable_Simple877 Aug 16 '25

Yeah I just learned about that today

15

u/MillyTHECHAOS Aug 16 '25

Or you can use this

Put qustions in a list and use for in

questions = [
    "Who is the Emperor of manking? ",
    "Name all Chaos gods: ",
    "Taco or fish: "
    ]
answers = []

def ask_questions():
    for question in questions:
        answer = input(question)
        answers.append(answer)

    print(f"You answers are:\n{"\n".join(answers)}")

ask_questions()

2

u/StellarNest-Dev Aug 17 '25

I think that is too advanced for beginners

2

u/timheiko Aug 16 '25

That‘s a great start!

If you are up to next challenge on your Python journey, I’d suggest decomposing the program into functions, e.g. one asks for the name, another asks for hobbies and so on.

Good luck ☘️!

1

u/Acceptable_Simple877 Aug 16 '25

Yea I’ll see I’m trying to get the basics down rn

2

u/purple_hamster66 Aug 16 '25

Great start. There are ways to optimize it, as others mention.

One convention is that variables start with lower case letters and Classes start with upper case letters. It’s confusing to read code that does not adhere to that convention.

1

u/Acceptable_Simple877 Aug 16 '25

Fs, ill keep that in mind.

2

u/StellarNest-Dev Aug 17 '25

That's a great start, is this your first time programming, or your first time using python

1

u/Acceptable_Simple877 Aug 17 '25

Not my first time programming, I’ve done a bit of python in the past but never really dove into it till now. I’ve also done some C#, SwiftUI, and HTML/CSS.

7

u/Darkstar_111 Aug 16 '25

Good start. Keep learning.

2

u/DevRetroGames Aug 16 '25

Hola, excelente código, aquí te paso uno un poco más avanzado, espero que te pueda ayudar.

Repo: https://github.com/DevRetroGames/Tutorias-Python/blob/main/code/base/input/01_get_user/main.py

Muchas suerte.

2

u/codingzap Aug 17 '25

That’s a good start, keep learning :)

2

u/Exotic_Battle_6143 Aug 17 '25

Great start bro

2

u/[deleted] Aug 18 '25

I love it - keep coding!

2

u/Cautious_Virus5524 Aug 18 '25

Super cool bro. this is what they are teaching me as well.

-2

u/Familiar9709 Aug 16 '25 edited Aug 16 '25

Why do people do these input things, etc? I've never ever used it even once in 10 years of programming.

Just do a more "dynamic" type of code, functions, etc, that do something interesting. These things are not useful.

1

u/MillyTHECHAOS Aug 16 '25

Can you show some of interesting projects? I bet for 10 years of exp you have a lot of them.

Or just dynamic type of code. We are learning so it can be very helpful.

3

u/Familiar9709 Aug 16 '25

Sure. Something on these lines looks in the right direction, but it's obviously quite complicated. I'm sure there must be easier ones if you google around, ask chatGPT, etc, but certainly just making lines and lines of code asking "insert input" is not useful

https://github.com/hamidshojaee/BlackJackSim

3

u/Familiar9709 Aug 16 '25

This looks like another great project, predator/prey https://harrymunro.hashnode.dev/predator-prey-in-python

1

u/Minute_Journalist593 Aug 18 '25

What you are saying is ok but not true for learning purpose he in on the right path

3

u/[deleted] Aug 16 '25

[removed] — view removed comment

2

u/Acceptable_Simple877 Aug 16 '25

Yea, I've made a quiz game and a few other basic projects using tutorials to learn. I'm trying to follow the tutorial then replicate parts of the project by myself.

2

u/[deleted] Aug 16 '25

[removed] — view removed comment

3

u/Acceptable_Simple877 Aug 16 '25

Yea I just learned about f statements today lol. I’ll keep that in mind.

2

u/Acceptable_Simple877 Aug 18 '25

Made it with minimal help

2

u/Minute_Journalist593 Aug 18 '25

cool bro i just wanted to know one thing here what is round 3 doing here can you pls explain

2

u/Acceptable_Simple877 Aug 18 '25

It’s for rounding the number 3 decimal points

2

u/Minute_Journalist593 Aug 18 '25

ops sorry i missed it you have converted the data type into float not int my bad bruh that's a good one keep it up