r/learnpython • u/[deleted] • Nov 16 '22
What are some beginner python projects you’d recommend for a beginner?
I’m a beginner and I want some ideas for a project.
r/learnpython • u/[deleted] • Nov 16 '22
I’m a beginner and I want some ideas for a project.
r/learnpython • u/magestooge • Jun 10 '20
I have been learning python for a few months, albeit slowly, because I can only do it in my free time and profession is something else. So one day I randomly decided to try making a small and silly text-based game which can be played inside Jupyter Notebook. My primary intention was to understand how to use classes. So I created a character class, a monster class, and a potion class. Then combined them into a game based on a lot of random numbers and some planned numbers.
In the game, you face a monster. You have three options, fight, run, and try befriending. If you fight, each one takes turn to strike until one is dead. The damage and health attributes are displayed on screen. Damage done is proportional to the remaining health. If you run, you lose endurance and must have higher endurance than the monster else they'll catch you. If you befriend, there's a 10% likelihood the monster will be friendly.
When you get a potion, you can take it or leave it. If you take it, there is a 50% chance it will turn out to be a trap. But damage of trap potions is lower than bonuses of actual potions.
All probabilities are based on how lucky you are. You start at 50/50 and get luckier through potions.
The game can be accessed here: https://colab.research.google.com/drive/1WcRTeaPwg3oRXzHH1m76r4SAaDJJkqSV
or here: https://github.com/gouravkr/notebooks
It's not something anyone would actually enjoy playing. But any feedback on the code will be highly appreciated.
Edit: after receiving some feedback, I changed the images to point to public URLs and reduced the number of cells to make it easier to run.
r/learnpython • u/rya11111 • Jun 18 '15
/r/learnpython is the subreddit of the day!!!
Do check out the article at: http://www.reddit.com/r/subredditoftheday/comments/3aa7hu/june_18th_2015_rlearnpython_help_sub_for_python/
Thanks a lot and do remember to check out the other subs featured! :)
Rya
edit: oops :P
r/learnpython • u/Icedragon2017 • Sep 09 '20
My wife is wanting to switch careers and has decided to take on python and learn data science. She is struggling to grasp the basics and I would like to point her to a few websites, apps, resources that will help her with a step by step on the how to and how not to. I'm learning javascript so I can't help her to much as I would like to. Hopefully I can just show her this post and she can use it to navigate to different resources. Thanks in advance.
Update. Thank you everyone. I am showing her all the comments and she is looking them up and exploring. Keep the comments coming. I have mentioned she can comment here, she may, she may not. I don't know.
r/learnpython • u/coffeedrinker1994 • Jul 03 '20
Hello, I have been rereading and seeking different definitions and watching different videos explaining python, but I cannot understand what the difference is between tuples,lists, dictionaries, and sets other than some you use {} [] or (). When would you use these? What are the practical differences? please explain in the absolute simplest caveman terms
Edit: Thank you all for your generosity of knowledge. I have learned alot from reading all the comments and answers.
r/learnpython • u/Snickersnook • Sep 10 '22
The last year, I've been learning Python from a course. Everything I've been taught I understood but now, when I boot up a compiler I simply cannot make even a 'simple' program such as a sprite that'll recognize when it'll get clicked. I simply don't know what functions to use, what modules to use and I simply can't recognize what is causing my errors. I feel like I know enough of the language to make a program but when I sit down, I know nothing and I can't.
r/learnpython • u/saintPirelli • Jan 21 '19
Hello,
for those of you interested in making retro games with Python and are just starting out (but know the basics) I have written up this tutorial using the Pyxel game engine. Mostly because I liked the engine and didn't find a single tutorial for it. Criticism welcome.
Link: http://blog.vomkonstant.in/2019/01/21/pythons-most-underrated-game-engine-for-beginners/
Cheers!
r/learnpython • u/notfromkentohio • Jan 23 '22
Hi all,
I've read about lambda functions (for python and other languages), I can WRITE lambda functions just fine, but it seems to me that most places I use them they're just...functions with different syntax. I mean they take args, they return values sometimes. What am I missing here? If anyone has examples of problems they've solved with lambda functions that would also be very helpful.
Thanks!
r/learnpython • u/rwmmir • Oct 07 '20
Hey,
what is the best way to learn using classes in Python? Until now, I was using functions for almost every problem I had to solve, but I suppose it's more convenient to use classes when problems are more complex.
Thanks in advance!
r/learnpython • u/WhatDoesThymine • Jan 23 '20
r/learnpython
•
u/Alive_Hotel6668
•
Feb 23 '26
Almost every program I try to do uses lists and tuples almost seem not useful. Almost anything a tuple can do can be done via a list and a list is a more flexible option with more functions and mutability hence what is the use of tuples over lists as tuples are completely replaceable by lists (atleast for what I do that is learning python basics) so are there any advantage of tuples?
Thanks in advance
r/learnpython • u/adamantium4084 • Mar 07 '22
I work as an inventory analyst and I'm sure most of you in similar fields have experienced messy/ hard to use data. I consider myself pretty proficient at excel, but I've come to realize its limitations in the past four months (drive starting in analytics). There are a few reports that I needed to combine/perform some calculations on. I tried in excel, but it kept freezing. Over about 60,000 lines a simple A2/7 caused an unrecoverable freeze.
I said, "fluff it!". I then spent all day today working on this report.
I am now finished.
It feels really good to say that.
Thank you all for being so helpful to this community.
r/learnpython • u/BeautifulSparrow • May 01 '21
I was just wondering because I love enjoy programming and enjoy when I figure out stuff. I'm only a student and usually have a set goal but I need more practice and want to code more things besides the book. What are some good beginner projects I could possibly do/learn?
Edit: thank you everyone so much, truly. All the comments have been helpful and have given me ideas I didn't have.
I feel I have more of a direction now.
r/learnpython • u/Bulky-Distribution26 • Apr 15 '21
Last year, I started learning python. Took a course, looked at some tutorials. When I tried to start a project, my mind just went blank. I didn’t know what to do, and I tried to do a project on my own. I was frustrated thinking “how come I can’t do anything? Is this just not meant for me?” I stopped coding again until January. Went through a book and realized that topics came much easier to me.
Then I found this subreddit, and constantly found the same advice on learning a language. Find what interests you and START A PROJECT. I found my interest and just went headfirst into the project. Looked up a couple of videos on some of the libraries I needed, looked up documentation, looked at GitHub and stack overflow.
After a couple of weeks, I finished up the first version of my project last night. Data engineering is very interesting to me, so I coded a simple etl pipeline. I extracted information from a sports api, validated the information, and loaded the info into a SQLite database. I installed DBeaver and loaded the table into a simple database. It’s not much, but it is a very encouraging start. I’ll post the code later on, but I just wanted to say thank you so much to this community!!
r/learnpython • u/SimulationV2018 • Dec 16 '20
I started learning Python 10 days ago and I just sent my first script to a client. (well friend) She asked if I could scrape a website for her. Pretty damn proud is all........
EDIT:
Never knew this would blow up like it did. Cheers for the awards thats wild. Well a lot of you have been requesting the code, here it is: Scraper
r/learnpython • u/jimtsa1980 • Nov 29 '20
Hi all,
I have a very simple script that it scrapes data from a website. Ideally, I need to be executed once per day. Do you have any idea how could I achieve that? As it isn't something official, I need something for free.
Thanks!
PS I mean something online. I know about cron tabs etc.
r/learnpython • u/Katatoniczka • Aug 06 '20
Hi guys, so just like most people in this sub, I'm trying to learn Python. However, there's something I've been wondering about. I've heard that juniors and interns usually just "get assigned simple tasks" at the beginning, I imagine those are tasks that just need to be churned out and don't require much conceptual work.
However, I haven't been able to find any examples of such tasks. I assume that Leetcode and creating personal projects from scratch are both very different from the kind of tasks you could be assigned when you're a member of a team that is coding for a large-scale project. But as I have no experience working for a company yet, I have no idea what those tasks could be. Could anyone give me some examples from personal experience and shed some light on this issue?
Edit: I'm so happy that this thread took off, thank you, everyone, for your detailed responses! I'm sure that all of us newbies will learn a lot from them. :)
r/learnpython • u/neisor • Jun 14 '20
Hi guys,
I have been wondering and googling without being able to find an ELI5 answer to: When to choose Django and when to choose Flask? What can only be handled in Django and not in Flask?
Thank you