r/learnpython • • Apr 25 '20

Ok so I'm committed to 1 year of coding in Python and I'm 1 month in, what kind of goals/benchmarks can I set for myself along the way?

544 Upvotes

I think it would be awesome to set some sort of tangible goals that I can work toward. SMART goals are ideal (specific, measurable, attainable, relevant, time-based). Please let me know if you can point in a good direction!


r/learnpython • • Feb 04 '20

PSA: To new programmers or to those new to posting code to reddit please learn how to use backticks and codeblocks when posting code.

544 Upvotes

I've had some spare time to parse this subreddit to help those in need. It is very apparent that not many know how to use code blocks or how to use backticks when making a post.

You can use a a single or triple backtick on the front AND back of the word which is this guy on your keyboard (not the tilde ~) to get formatting like this. In your editor it should look like `this`.

As for code, use FOUR spaces at the start of each new line to indicate code.

for i in [1,2,3]:
    print(i)

This helps others read your code and encourages other to help. No one wants to read spaghetti code on top of it being unformatted.

Thanks in advanced!

Edit:

From /u/SoNotRedditingAtWork:

New reddit's text editor also has these cool buttons called Inline Code and Code Block that ya'll can use to properly format your code snippets. The** Code Block** option is real nice because your code will keep its whitespace when you copypasta it into an open block in the editor.

From /u/lanemik:

Also, if you're using the new Reddit, you can type cmd-j on mac to

 enter a code block

You can also do cmd-k create a link. Or do cmd-i to get into or out of italics. Obvs cmd-b gets you into or out of bold. I'm not too sure about all the others. I don't know if there is a key combo that gets you to inline code or blockquotes or super/subscript.

From /u/TSPhoenix:

Btw you can use escape characters on reddit (but not in code blocks). Type `test` and it will display test in the text of your post so you can more cleanly explain how to get test.


r/learnpython • • Jul 06 '20

I feel very dumb trying to learn python. And it kicks my anxiety into overdrive.

539 Upvotes

I am 28 years old and at a crossroads in my life. I have left my "career" of 10+ years to pursue programming.

I am by no means a "computer wiz" or even "tech savvy". I never even learned to touch type. (I still look at the keyboard when I type.)

However, I've always been interested in programming. My parents are programmers with 30 years of experience, and still to this day generally enjoy it. I thought I could start learning the basics and over time build an understanding of computer language.

I am about a week into youtube "python for absolute beginners" videos. It started off pretty strong and I'm still very interested, its just so many terms and rules just being thrown at me and I cant retain any of it. I understand with repetition it gets easier to understand. But right now I can barely think and comprehend whats being taught.

The overbearing feeling that I am just too dumb to learn something like this is holding me back. It's gotten to the point where I can only take about 30 of trying to learn before the anxiety kicks in and I have to stop.

I really want to do this, I think of all the possibilities of what I can do and create with this language and it keeps me going. I've just been hitting a brick wall recently.

I mostly just need to get this off my chest, but any advice is greatly appreciated. Thanks for hearing me out.

TL:DR - I'm very interested in learning python, but its proving to be more difficult than I imagined.

Edit: Thank you to everyone for all the kind words and responding so quickly. It's good to know that alot of people are in my shoes dealing with the same issues. All professionals start as beginners.


r/learnpython • • Jun 26 '19

Wanna to learn python? Don't read books. Do the side project!

538 Upvotes

I'm lurking the sub for some time already. I believe managed to help some of you already so you may know me.

Now I want to help some more...

One thing I noticed is that the great part of you just read books, do courses, read more books, watch youtube videos etc. And you're struggling with using the concepts you've learned (not really learned actually) in a real life. Here is what I propose.

Don't read books. Do the opposite.

Yes, the opposite! Get an idea for a little more than a simple project and do it!

The project cannot be too simple, because you would be lying to yourself that you're proficient. What you need is a project that you are not sure you can make. That's a challenge. But there's something more to make it work.

Pick the topic you're passionate about

To achieve what suppose to be "impossible" at the beginning, you need something the scientists call "the flow".

If you play video games, you know what I'm talking about. It is a state of hyper-productivity, hyper-focus - it's when the magic happens.

Prepare a distraction-free environment. No kids running around. No TV. No Facebook. No smartphone. Just you, your laptop, headphones, and instrumental music. Once you get into the flow, stay there as long as you can. Ask your spouse to not interrupt.

What can help you is to pick the topic for the project that you're passionate about. It is gonna be a little bit easier for you to start, and maintain the excitement.

"I don't have the motivation. I don't have time."

Motivation's garbage. Don't count on you being motivated. Just don't. It's another excuse to not produce any results. Ass in the chair. Headphones on the head, no distractions. Just you and the project. Everyday. No excuses. If you can't do it, resign right now, don't waste your time. You can't be great without the pain of forcing yourself.

"I just can't into programming yet..."

Do the project first, and learn as you go. Do you need loops? Learn, and use them immediately. Need functions? Learn and use, and use them immediately. Do you need classes? You know what to do. Trust me it works. Especially with python.

"How the f*** you know it works?"

I am an example. I'm now the Technical Lead for Atlanta based startup. I did in 3 years after university. I have never read a book about python in my entire life.

All I did was picking up the project, developing it, learning as I go, showing to the people and fighting with fire on production. Get the feedback ASAP.

Last 2 jobs I did get without even showing my résumé to the HR. I just showed them my side projects.

At the beginning I started with a 2D game based on `pygame` library in python 2.7. Do you think I knew how to do it? Nope. I spend 1 week on something that today could take me 1 or 2 hours. Check this out.

Then I've created my first Django projects. I learned how to design a REST API. After that I've met android developer and we've made 3 mobile apps, one of them having 500 users simultaneously. I had to make it work to not let the users down. That's the pressure you want to get! You know the best practices because you just had used them. You didn't have any other choice, but a massive failiure.

Show your project, get the feedback, feel the pressure.

In this very moment, I mentor 2 people - 20-year-old student and 27-year-old firefighter who wants to change his current job.

They picked up the projects, I do the code reviews for them. We have a knowledge learning session once per 2 weeks. They get the feedback, they learn and they leveraging my experience. I advised them to not read "Learning Python" book, but just start working on a project, and open this book only when it's necessary to move forward.

Pick the project, good luck, have fun.

** Edit

After reading the comments I think I went a little bit too "click-baity". I'm sorry for that. Clarification: Of course, read the books to solve the problems you encounter during the side project. Like the book I mentioned "Learning Python" - it's a great book for beginners but as a reference book (like I used it) not as a cover-to-cover novel to read. Without putting the things you read into action in a real project, you will forget soon.


r/learnpython • • Feb 27 '20

Thank you 🙏 r/learnpython members

534 Upvotes

I just wanted to say a big thank you to everyone on here that takes the time to teach newbies like me how to code properly.

My journey into programming has been eye opening, especially when I need help understanding how to complete my course assignments.

This has been my experience so far:

StackOverflow - don’t ever ask questions until you are an expert or you’ll get verbally slapped. It’s like you are not worth their time.

Python Discord - people on the help channels seem like they know what they are talking about but don’t help much. Sometimes just like those on SO. In the recent past I asked the same question about 4 separate times and got nothing but dead air.

I’ve tried getting a tutor from Kijiji but all they want to do is complete your assignment for you and charge you $hundreds. I’m not going to learn that way.

This subreddit seems to be the only place I have found that gives me respect as a beginner and the help I need by providing suggestions. I don’t think I’ve ever felt degraded or dismissed.

So again, thank you to everyone who takes the time to help new programmers. 🍻


r/learnpython • • Sep 22 '22

Just signed up for 100 days of Python, due to this group

533 Upvotes

I am a beginner with Python, and have been struggling to learn, yes, I'm 60 years old. I came across one posting about "read the book, but do every exercise and note as well. Then I saw how many people are commenting about how good the Udemy course is, so I signed up today and will start day 1 tomorrow, thanks for the info everyone! Looking forward to learning something new!


r/learnpython • • Nov 24 '22

Corey Schafer is Coming back!

531 Upvotes

The best person (IMO) to learn basic python from - Corey Schafer is back on YouTube after 2 years. His channel was my entry into python, before I only knew C++. It helped me become a Python Developer and his tutorial on Django is unparalleled.

So excited that he is going to continue to make python content again after 2 years.

Just saw his month old Post.

Hey everyone. Wanted to give y’all an update on me getting back to making educational videos and the channel in general. First, the channel will be hitting 1 million subscribers today and I can’t thank you all enough. When I first started making educational videos, it was actually just something I thought I would use for myself that I could revisit or send around to coworkers to explain certain concepts. To see that so many others have found the videos helpful was unexpected, but I couldn’t be happier hearing from people around the world who have said it helped them understand certain concepts. So thank you all so much for that. In terms of future videos, I have several videos and series’ I’ve been working on. I have to admit, after taking a break from teaching for an extended period, it’s been difficult to get back into the swing of script writing and video editing, but that should only be temporary. I’m currently working on a personal project that I will turn into a video video where we use a headless browser to consolidate some monthly billing information and text the information on a monthly basis… all using Python. I’m also going to put together some stuff on Computer Science algorithms, as well as looking at other languages, like JavaScript. I think that’s all for now. Thank you all so much for you patience, and thank you so much for your support. And lastly, thanks for the 1 million subs! Still hard to believe. Enjoy your weekends everyone!!!3.2K


r/learnpython • • Jan 17 '20

I wrote a script that grabs the hottest post on /r/wallpapers and sets it as your background.

529 Upvotes

Inspired by /u/glof2 's post, I created a script that uses PRAW to scrape /r/wallpapers and sets it as your desktop wallpaper. It only works for windows, but I might work with some friends in my classes and develop a linux/macOS version. Otherwise, if ya wanna try and make it yourself feel free! If you like it, use it with task scheduler to set a new wallpaper every day.

Link

This was a fun project because I learned a lot about PRAW, different packages, and how to use GitHub. Feedback appreciated!


r/learnpython • • Oct 08 '19

I recommend the official Python tutorial for certain learners

528 Upvotes

I've been learning python for a while and feel like I know it on an intermediate level. Yesterday, I decided to take a look at the official Python Tutorial because I never had before. I ended up staying up until 2am reading it because I'm a fucking nerd.

I'm going to be honest, for a total programming beginner, I believe this "tutorial" might scare them off. It's pretty technical and doesn't hold back on jargon and details that would confuse an absolute newbie.

But for someone who is either:

  1. Already comfortable with the basics of python and programming concepts

  2. Coming from another language

the tutorial is great! It gives a level of detail into the language that you don't get in most regular tutorials.

It can be dry if you're not really passionate about programming, but the information you'll pick up and the deeper understanding you'll gain will be worth the time to read the entire thing.

If you're looking for the next step to deepen your understanding, check it out. It's definitely not just another oversimplified "basics" tutorial.


r/learnpython • • May 26 '20

I made an online Python interpreter that doesn't suck

527 Upvotes

Most online python interpreters suck because they try to be complete IDEs with bloated designs and none of them work on mobile.

I spent the coronavirus lockdown time building a simple python interpreter that doesn't suck, has a simple design and works on mobile. It also has a nifty dark mode feature.

I would appreciate any feedback on the tool - in terms of UI/UX, security, packages, feature requests and I would be happy to answer any questions regarding how I built it.

https://www.programiz.com/python-programming/online-compiler/


r/learnpython • • Dec 05 '20

Exercises to learn Pandas

526 Upvotes

Hello!

I created a site with exercises tailored for learning Pandas. Going through the exercises teaches you how to use the library and introduces you to the breadth of functionality available.

https://pandaspractice.com/

I want to make this site and these exercises as good as possible. If you have any suggestions, thoughts or feedback please let me know so I can incorporate it!

Hope you find this site helpful to your learning!


r/learnpython • • May 25 '21

what stuff could i write in python that would be useful in everyday life?

525 Upvotes

ive been learning python for a few days now, and im enjoying it. very interesting stuff. what stuff could i make when I'm bored? or something useful that i would use quite often?


r/learnpython • • Sep 13 '19

I'm so happy!... I've just written a program for the first time that didn't come from a book or an exercise!

524 Upvotes

It's so, so basic and probably incredibly inefficient - but I don't care! I'm ecstatic :D

I want to look at my spending habits with Amazon, I thought they would just provide me with a CSV of my historic order, and they do - but only for the US site (I'm British).

So I thought I would make web scraper that made a CSV file for me. I haven't learned how to make a web scraper yet - as I'm not familiar with BeautifulSoup.

However, I did realise that part of the process would be flicking through Amazon Order pages so I thought I should create something that spits out a URL to a page.

At some point, I intend to make this automated so that it cycles through all of the pages of a given year. As of right now, the user inputs a year and what page they would like to view and the program opens that URL in a new tab :).

Thanks very much to everyone here :)

Here is the code!! (GitHub Gist Link)


r/learnpython • • Nov 05 '22

2,000 free sign ups available for the "Automate the Boring Stuff with Python" online course. (Nov 2022)

523 Upvotes

UPDATE: The codes are used up. You can still watch the first 15 videos on YouTube. You can also go to the course page and click "Expand All Sections" and click the "Preview" link for each video to watch them on the site.

If you want to learn to code, I've released 2,000 free sign ups for my course following my Automate the Boring Stuff with Python book (each has 1,000 sign ups, use the other one if one is sold out):

https:// udemy. com/course/automate/?couponCode=NOV2022FREE

https:// udemy. com/course/automate/?couponCode=NOV2022FREE2

Udemy has changed their promo code and severely limited the number of sign ups I can provide each month, so only sign up if you are reasonably certain you can eventually finish the course. The first 15 of the course's 50 videos are free on YouTube if you want to preview them.

YOU CAN ALSO WATCH THE VIDEOS WITHOUT SIGNING UP FOR THE COURSE. All of the videos on the course webpage have "preview" turned on. Scroll down to find and click "Expand All Sections" and then click the preview link. You won't have access to the forums and other materials, but you can watch the videos.

Instead of having unlimited free sign ups for 6 days per month, Udemy only lets me make 2,000 free sign ups per month. >:(

NOTE: Be sure to BUY the course for $0, and not sign up for Udemy's subscription plan. The subscription plan is free for the first seven days and then they charge you. It's selected by default. If you are on a laptop and can't click the BUY checkbox, try shrinking the browser window. Some have reported it works in mobile view.

Sometimes it takes an hour or so for the code to become active just after I create it, so if it doesn't work, go ahead and try again a while later.

Some people in India and South Africa get a "The coupon has exceeded it's maximum possible redemptions" error message. Udemy advises that you contact their support if you have difficulty applying coupon codes, so click here to go to the contact form.

I'm also working on another Udemy course that follows my recent book "Beyond the Basic Stuff with Python". So far I have the first 15 of the planned 56 videos done. You can watch them for free on YouTube.

Side note: My latest book, Python Programming Exercises Gently Explained is a set of 42 programming exercises for beginners for free or as a 99 cent ebook.

Frequently Asked Questions: (read this before posting questions)

  • This course is for beginners and assumes no previous programming experience, but the second half is useful for experienced programmers who want to learn about various third-party Python modules.

  • If you don't have time to take the course now, that's fine. Signing up gives you lifetime access so you can work on it at your own pace.

  • This Udemy course covers roughly the same content as the 1st edition book (the book has a little bit more, but all the basics are covered in the online course), which you can read for free online at https://inventwithpython.com

  • The 2nd edition of Automate the Boring Stuff with Python is free online: https://automatetheboringstuff.com/2e/

  • I do plan on updating the Udemy course for the second edition, but it'll take a while because I have other book projects I'm working on. If you sign up for this Udemy course, you'll get the updated content automatically once I finish it. It won't be a separate course.

  • It's totally fine to start on the first edition and then read the second edition later. I'll be writing a blog post to guide first edition readers to the parts of the second edition they should read.

  • I wrote a blog post to cover what's new in the second edition

  • You're not too old to learn to code. You don't need to be "good at math" to be good at coding.

  • Signing up is the first step. Actually finishing the course is the next. :) There are several ways to get/stay motivated. I suggest getting a "gym buddy" to learn with. Check out /r/ProgrammingBuddies


r/learnpython • • Mar 05 '26

I spent months learning Python and only today realized I've been confused about something embarrassingly basic

520 Upvotes

I've been writing Python scripts for a while now. Nothing crazy, just automating small stuff, scraping some data, making my life a little easier. I thought I had a decent handle on things.

I was looking at someone else's code and they used a list comprehension in a way that made me stop and read it three times. I realized I had been writing loops the long way this whole time not because I didn't know list comprehensions existed but because I never really trusted myself to read them when I wrote them fast. I kept defaulting to the for loop because at least I could trace it line by line without second-guessing myself.

I don't know if this is a common thing but I feel like there's a version of learning where you know a concept exists, you've seen it work, you've even used it a few times, but you haven't actually internalized it. You're kind of faking fluency in that little area. I was doing that with list comprehensions, with zip, with a few other things I won't list here because it's already embarrassing enough.

Once I wrote out ten examples by hand tonight it clicked in a way it hadn't before even though I'd "learned" this two years ago.

Anyone else have a concept they thought they understood for a long time before actually understanding it?


r/learnpython • • Oct 10 '24

What is a Python trick you wish you could have learned/someone could have taught you?

514 Upvotes

Newbie programmer here, let's make this a learning process for everyone


r/learnpython • • May 01 '23

2,000 free sign ups available for the "Automate the Boring Stuff with Python" online course. (May 2023)

514 Upvotes

UPDATE: The codes are all used. But you can still watch the first 15 videos on YouTube and also watch the rest on the course page on Udemy. Scroll down to find and click "Expand All Sections" and then click the preview link for each video.

If you want to learn to code, I've released 2,000 free sign ups for my course following my Automate the Boring Stuff with Python book (each has 1,000 sign ups, use the other one if one is sold out):

https:// udemy. com/course/automate/?couponCode=MAY2023FREE

https:// udemy. com/course/automate/?couponCode=MAY2023FREE2

Udemy has changed their promo code and severely limited the number of sign ups I can provide each month, so only sign up if you are reasonably certain you can eventually finish the course. The first 15 of the course's 50 videos are free on YouTube if you want to preview them.

YOU CAN ALSO WATCH THE VIDEOS WITHOUT SIGNING UP FOR THE COURSE. All of the videos on the course webpage have "preview" turned on. Scroll down to find and click "Expand All Sections" and then click the preview link. You won't have access to the forums and other materials, but you can watch the videos.

NOTE: Be sure to BUY the course for $0, and not sign up for Udemy's subscription plan. The subscription plan is free for the first seven days and then they charge you. It's selected by default. If you are on a laptop and can't click the BUY checkbox, try shrinking the browser window. Some have reported it works in mobile view.

Sometimes it takes an hour or so for the code to become active just after I create it, so if it doesn't work, go ahead and try again a while later.

Some people in India and South Africa get a "The coupon has exceeded it's maximum possible redemptions" error message. Udemy advises that you contact their support if you have difficulty applying coupon codes, so click here to go to the contact form. If you have a VPN service, try to sign up from a North American or European proxy.

I'm also working on another Udemy course that follows my recent book "Beyond the Basic Stuff with Python". So far I have the first 15 of the planned 56 videos done. You can watch them for free on YouTube.

Side note: My latest book, Python Programming Exercises Gently Explained is a set of 42 programming exercises for beginners for free or as a 99 cent ebook.

Frequently Asked Questions: (read this before posting questions)

  • This course is for beginners and assumes no previous programming experience, but the second half is useful for experienced programmers who want to learn about various third-party Python modules.

  • If you don't have time to take the course now, that's fine. Signing up gives you lifetime access so you can work on it at your own pace.

  • This Udemy course covers roughly the same content as the 1st edition book (the book has a little bit more, but all the basics are covered in the online course), which you can read for free online at https://inventwithpython.com

  • The 2nd edition of Automate the Boring Stuff with Python is free online: https://automatetheboringstuff.com/2e/

  • I do plan on updating the Udemy course for the second edition, but it'll take a while because I have other book projects I'm working on. If you sign up for this Udemy course, you'll get the updated content automatically once I finish it. It won't be a separate course.

  • It's totally fine to start on the first edition and then read the second edition later. I'll be writing a blog post to guide first edition readers to the parts of the second edition they should read.

  • I wrote a blog post to cover what's new in the second edition

  • You're not too old to learn to code. You don't need to be "good at math" to be good at coding.

  • Signing up is the first step. Actually finishing the course is the next. :) There are several ways to get/stay motivated. I suggest getting a "gym buddy" to learn with. Check out /r/ProgrammingBuddies


r/learnpython • • May 20 '21

Created my first major project with python 🎉

514 Upvotes

Hey everyone! I've been learning python for about a year and a half now and I finally have something to show for it! I decided to create a website using Django and bootstrap. It's made for students in the pandemic where you could search or create a study group! If you would like to check it out and leave some feedback that would be amazing!

github: https://github.com/Vortes/Study-Buddies-Open

site: https://studybudds.com/


r/learnpython • • Jun 19 '20

Is python a good programming language for a freelancer

513 Upvotes

Hello everyone, I am 13 years old and I have already been programming python for almost 1.5 years. I really like to do it and I hope to make my job out of this eventually. I also really like traveling and so I started thinking of what I could do in the future.

I have been searching and the closest I could find was a freelancer. My ideal job is to be independent so that I can finish the programs I am supposed to finish no matter where I am.

Is there in this subreddit anyone who has does this kind of job and who could tell me their experience and how they started?

Edit: Thank you all very much, I really appreciate all your positive and motivating comments. I will keep on learning programming in order to reach my goal. Which is to combine programming with traveling.


r/learnpython • • Nov 24 '19

The basics so basic they don't even teach it

513 Upvotes

What is an environment, whats a configuration?

I keep seeing terms like these and a bunch of other stuff in Python courses I take, but no one takes the time to explain how Python even works on my computer. Are there any videos you can suggest that talk about not how to program with Python but what an environment is and why I have both a terminal and IDLE. Explaining Python even functions on my Mac.

thanks!


r/learnpython • • Feb 16 '21

Struggling With Masters Due To Depression

512 Upvotes

Hi Guys, I’m not sure if this is the right place to post this. If not then I apologise and the mods can delete this. I just don’t know where to go or who to ask.

For some background information, I’m a 27 year old student who is currently studying for her masters in artificial intelligence. Now to give some context, my background is entirely in education and philosophy. I applied for AI because I realised that teaching wasn’t what I wanted to do and I didn’t want to be stuck in retail for the rest of my life.

Before I started this course, the only Python I knew was the snake kind. Some background info on my mental health is that I have severe depression and anxiety that I am taking sertraline for and I’m on a waiting list to start therapy.

My question is that since I’ve started my masters, I’ve struggled. One of the things that I’ve struggled with the most is programming. Python is the language that my course has used for the AI course and I feel as though my command over it isn’t great. I know this is because of a lack of practice and it scares me because the coding is the most basic part of this entire course. I feel so overwhelmed when I even try to attempt to code. It’s gotten to the point where I don’t know how I can find the discipline or motivation to make an effort and not completely fail my masters.

When I started this course, I believed that this was my chance at a do over and to finally maybe have a career where I’m not treated like some disposable trash.

I’m sorry if this sounds as though I’m rambling on, I’m just struggling and any help or suggestions will be appreciated.


r/learnpython • • Nov 10 '20

Looking for a student to help with Python basics

512 Upvotes

Hello. I want to mentor someone who is struggling as a beginner.

I have graduated as a software engineer, now working in gamedev. I've taught for a few years in my local university (SQL + database design) and enjoyed working with freshmen.

I want to guide someone who already can write few lines of code, but struggle with more. It is much easier to learn when you can just ask a tutor, or when your code is frequently reviewed. I can help with Python fundamentals - data types, functions, loops, classes, basic program structure, etc. We'll do voice call with screen sharing as well.

It's free, no strings attached. Downside: English is not my native language, my speech is clumsy, my grammar can be weird. If it is ok with you, PM me your background, needs and goals (including some of your recent code will help).

UPD: Please give me some time to answer and sorry for delays, there are a lot of messages already! I might not be able to answer everyone.


r/learnpython • • Jul 30 '20

I made my first website using Python!

512 Upvotes

Ocean Personality Visualization


Website Link: https://ocean-pv.herokuapp.com/

Repo Link: https://github.com/IgnisDa/ocean-pv/

EDIT: u/_fimin had this idea, here's an account if you don't want to login but still check it out:

Username: Kcliix

Password: notacommonpassword

However, it'd make my day if you made your own account.


After about three (or was it four?) months, I proudly present to you, my first major python project, a website called Ocean Personality Visualiztion. Before this, I made a small Hangman game as my first project and then a cli based login system.

I used Django as my web framework, and a free HTML template I grabbed off the internet (I have no frontend experience). That might be a reason why the website still looks kinda sloppy.

Though I have made a thorough README explaining what the website does, I will explain it a bit here.

A website to visualize your personality using graphs and compare it with others. It asks you a series of questions and analyzes your inputs to create an easy to understand graph. It also provides you an easy way to share these results with your peers and compare your personalities. It is based on the OCEAN personality model which is the most acceptable model to measure personality used by researchers.

What all did I learn from this major (to me) project?

  • The actual website development and how different components go together to make a functioning website.

  • I need to learn Javascript.

  • Deployment is hard- I tried to go the hard way at first by not choosing Heroku (it streamlined the process a lot) but I had to scramble back to it because how hard it is to deploy a dynamic website.

  • How awesome and Python is as a programming language. I absolutely adore it.

  • Documentation sucks

  • Testing sucks

Anyways, I am still mighty proud of what I have done and I invite you all to checkout the website and provide some feedback. If you'd like to make any pull requests, the repo link is above.

PS: If anyone can help me fix my tests, I will be forever grateful to you.


r/learnpython • • Jul 13 '20

I wrote my first program today!

511 Upvotes

I'm a couple of days into learning Python and today I wrote my very first program for an idea I came up with myself, not because the book told me to!

It's a program to determine the value of the discriminant and x in an equation that follows "ax² + bx + c = 0", anyway here's the code:

# This is for calculating the discriminant when trying to find x in "ax² + bx + c = 0"
import math
try:
    print("a?")
    a = int(input())
    print("b?")
    b = int(input())
    print("c?")
    c = int(input())
    def discr(a,b,c):
        discriminant = b ** 2 - 4 * a * c
        if discriminant < 0:
            print("Discriminant =")
            print(discriminant)
            print("No value for x possible")
        elif discriminant == 0:
            print("Discriminant =")
            print(discriminant)
            print('x =')
            print((-b)/(2*a))
        elif discriminant > 0:
            print("Discriminant =")
            print(discriminant)
            print('x = ')
            print((-b + math.sqrt(discriminant))/(2*a))
            print('x = ')
            print((-b - math.sqrt(discriminant))/(2*a))
    discr(a,b,c)
except ValueError:
    print("That's not a number")