My first py program :)
Posted by Visual_Tooth_2277@reddit | learnprogramming | View on Reddit | 27 comments
Hi everyone! I'm 14 and I'm starting my journey to become a Software Engineer. I've just created my first Python project entirely by myself. It's a simple random command generator. What do you think?
I've uploaded it on github, plz no hate https://github.com/GiosiGiova125/Your-favourite-py-command
If there are issues write on the issues section of the project or just here.
If u want gave me a star!
Thank you!
alan10h53@reddit
Nice first program! đ You can really see the excitement in it, and using lists + random.choice is a great way to start.
Just a small tip: fixing a few typos (like âpytonâ â âpythonâ, âwhitâ â âwithâ, âfirsâ â âfirstâ) will make your code look even cleaner.
For your next step, you could try making a simple guessing game: ask the user to choose a number between A and B, generate a random number, and check if they guessed right. If they do, print a success message... if not, encourage them to try again.
Itâs a fun way to practice input, conditionals, and randomness all together.
Keep going, youâre doing great!
Visual_Tooth_2277@reddit (OP)
Grazie dei consigli, mi scuso ancora per gli errori di battitura ;(
alan10h53@reddit
Don't worry. Typos happen all the time. But what really matters is the logic. The rest is polishing.
trevorthewebdev@reddit
Very cool. My 40 year old is envious that you are doing at that age only because I wish I got my start then!
Next up, think of a problem or even something that takes you a bit more time than it should and brainstorm how you code that away!
Visual_Tooth_2277@reddit (OP)
Grazie dei consigli!
Visual_Tooth_2277@reddit (OP)
https://github.com/GiosiGiova125/Find_the_word
Eccolo qui! Ci ho messo un bel po ma sono fiero del risultato!
Se ci sono bug ditemelo!
(Se a qualcuno fa piacere potrebbe scrivermi qui sotto su come usare il tasto tab per "spostare" il codice, lo ho dovuto fare perchĂŠ senno dava problemi. Non è stato facile farlo, per questo se a qualcuno va di spiegare ne sono grato đ)
thanksâ¤ď¸
sam661203@reddit
Some comments First of all: you are on the right track; keep going. Here are some advices to improve your python skills: 1. Pay attention to typos 2. Module name should not contain spaces, best style is snake_case.py 3. Itâs better that line doesnât exceed 100 characters, for better readability 4.no need to document imports 5. Use âif name == âmainâ:â and put executable code under it
Visual_Tooth_2277@reddit (OP)
Scusa per gli errori di battitura, sono italiano e a volte quando scrivo mi partono :( Cercherò di migliorare, grazie ;)
sam661203@reddit
Fix: Reddit converted the double underscores with bold font, nam and main should be surrounded by double underscores
lgastako@reddit
If you quote the text with backtics it won't eat the underscores, eg.
if __name__ == "main"andsnake_case.py.sudomeacat@reddit
This is really cute! After studying what feels like a math major, this is refreshing to see. Good luck with your SE journey!
One suggestion: Source code/script file names donât use spaces and dots. If you use a command line to run your code, youâll have to do something like
python3 "your favourite py command V 2.0.py"orpython3 your\ favourite\ py\ command\ V\ 2.0.py. Instead, file names are snake case like variable names, so likepython3 your_favourite_py_command.py.Also the version can be tracked with git, so you donât need to put it in the filename.
And same thing with periods. A period is usually used to separate the file name and file type, so substituting that with an underscore or hyphen would be stylistically better.
scub_101@reddit
Congrats! In 2014 when was 14, I started my Software Engineering journey as well! A big thing for me when I was your age was understanding the core concepts of OOP (Object-Oriented Programming). Like understanding what a Class is, how methods are called, Instance Variables, variable types, learning about different data structures, etc. Learning about those concepts are key to becoming a true software engineer! Having the basics baked into you will take you far in this industry. I didn't learn Python as my first language when I first started programming. Instead, I learned Java since that was what was taught at my high school. It is a little more syntax heavy and kind of teaches you about case sensitivity, distinct typed variables, and about some other nuances that come with OOP. See if your school has any computer programming class electives. That's what got me hooked into programming, and it will become second nature to you since you will be in a classroom learning it everyday!
As another poster has said already, try to stay away from using AI for learning. Using AI in this critical stage in your life when learning how to program can hinder your learning and will not teach you how to fail and learn from when things break in your code. Being able to break things in your projects, UNDERSTAND how it broke, and how to FIX IT are the key differences in an average programmer vs. an excellent programmer!
Visual_Tooth_2277@reddit (OP)
Grazie infinite per la tua storia, mi hai veramente fatto capire come tutto funzionaâĽď¸. D'altronde Äžia non andrebbe usata in nessun contesto scolastico (matematica, geografia, inglese...) perchĂŠ sennò fa tutto per te e non impari niente. Una piccola domanda, sempre se ti va di rispondere ovviamente, perchĂŠ non vedo le visualizzazioni su github? Rimangono sempre le stesse... Grazie!
scub_101@reddit
Yes for views I honestly don't know. I could care less (for my GitHub projects at least) if people view my projects. I don't think having a ton of views has any sort of meaning besides people just viewing it because they want to. I don't think it updates automatically either which is why I am not bothered by views. Now if someone had a PR (a Pull Request is when someone is trying to get changes for your codebase approved by you to be implemented int your project) then that would make me very happy. But at this stage, you should not be worried about the views, worry mostly about the code it is you are writing and how to improve upon it : ).
Visual_Tooth_2277@reddit (OP)
Vero, sto facendo un nuovo codice, visto che stasera non ho nulla da fare... sto provando a farlo dopo un video che mi insegnava altre funzioni. Ă un giochino dove devi trovare la parola segreta ( senza guardare il codice possibilmente ;) ) Mi sto divertendo!
cheezballs@reddit
Let the addiction begin!
Visual_Tooth_2277@reddit (OP)
Is it a bad thing?đ
Visual_Tooth_2277@reddit (OP)
Versione 2.0 appena rilasciata. Ho soltanto spostato il import random in cima :)
Only-Percentage4627@reddit
Hey good on your man! An advice, try not using ai for learning. Right now its important for you learn logic and critical thinking which ai takes away. It will be harder but much more rewarding
Visual_Tooth_2277@reddit (OP)
Grazie per il consiglio! Avevo gia capito che l'IA non è il massimo, ho cercato dei brevi tutorial sulle variabili e le basi. Se hai qualche sito free da consigliarmi o robe simili per imparare GRAZIE. Grazie ancora per i complimenti
Only-Percentage4627@reddit
Try making more stuff and get a habit of reading programming books. Thats where most of the knowledge is.
For python the book beginning python from novice to professional is good. It teaches you a lot, and if you have any questions you can ask me in the future I would be glad to help.
Visual_Tooth_2277@reddit (OP)
Thanks a lot for the advice
deleted_by_reddit@reddit
[removed]
AutoModerator@reddit
Your post/comment was removed since we do not approve of going private.
There is zero benefit in going private as you lose the opportunity for getting peer reviews. Also we have had plenty of people return after going private (despite being warned) complaining about how they were ghosted after some time or being tricked into buying rubbish that didn't work and even if it did they didn't need.
Our Rule #11 demands that any and all communication happens in the open, public subreddit.
This is for the benefit of more against the benefit of one.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
Visual_Tooth_2277@reddit (OP)
Se ti va, lasciami una stella su GitHub, mi aiuterebbe molto!
Espfire@reddit
When using âimportâ itâs best to do that at the top of the file, to ensure everything is imported before you start using external libraries. It works in this case as youâre using ârandomâ after âimportâ. But just a little bit of advice.
As Iâm sure others will say, as youâre starting out - avoid using AI. Learn the basic principles and make more smaller projects.
Best of luck!
Visual_Tooth_2277@reddit (OP)
Grazie ancora dei consigli!