I'm the author of Python Crash Course, from No Starch Press. The book is not available as an audiobook. Over the past five years there are numerous ripoff books that have used the phrase "crash course" in their title. These are machine-generated "books" that gain a high ranking on Amazon by offering a free version and dumping a bunch of fake reviews, and then try to grab a little cash through some paid versions. Here's a clear example of this.
I wonder if OP downloaded one of these fake books. I know my book doesn't work for everyone, but it's really frustrating to watch these ripoff books get in the way of people who are sincerely trying to learn.
Python! Simple for beginners to hop straight in and complex enough to make sophisticated applications later on. I would say just grab this book and dive in head first. Or just look up videos on YouTube. https://www.amazon.com/dp/1593279280/ref=cm_sw_r_cp_apa_fabc_Ult3FbQT9VY7X
Best way to learn is to pick one language and stick with it. You can learn others later!
Also, "The Coding Train" is a very fantastic and entertaining coding youtube channel!
Python Crash Course, 2nd Edition: A Hands-On, Project-Based Introduction to Programming is good book for Python for people without previous programming experience. I do not have any recommendations for Flask and React since I do not use them.
This book is absolutely the most incredible thing I've come across so far. I started out using Code academy but honestly I kept getting bored with how linear it was (In my opinion) and honestly I personally learn better when I can take the bite sized pieces and do what I want with them which is what this book does.
It defines the function simply, gives examples of how it's used and then a visible representation of the function in action, and after that it'll give you exercises (that I like to customize) that you can try yourself. I'm only on chapter four which introduces loops but this book goes everywhere with me along with a journal to physically write down code and then test it when I'm near a computer.
There are other books in this series but I refuse to overwhelm myself with too many books at once.
I'm aware not everyone retains information the same way but if you'd like I can post pictures of the layout of the book so you can get a feel for it. I'm fairly new to Python and it is my first language (although I did look into Javascript, CSS and HTML first but didn't actually retain it as well. I intend to go back to those after I 'master' python.)
Sorry for the book of a comment! I got excited...
I've read so many of those Reilly books and they are all super dull and sometimes hard to follow. Best python book I came across is this Python Crash Course: A Hands-On, Project-Based Introduction to Programming https://www.amazon.com/dp/1593276036/ref=cm_sw_r_cp_apa_i_OByyCbMTJD8GC
I had the same situation a few years ago. We used C/C++ at school, but I wanted to learn Python. It's quite simple compared to C.
I used this book along with Derek Banas' videos on youtube
I am new also. A am using the book Python Crash Course
https://www.amazon.com/Python-Crash-Course-Hands-Project-Based/dp/1593276036
and it is quite helpful so far. I am going to finish the whole book and type out all the exercises
There is a book called Python Automate the Boring Stuff that is a perfect starting point for using python to automate many common computing tasks relevant to most any job that involves a computer.
I can recommend this book
https://www.amazon.com/Python-Kids-Playful-Introduction-Programming/dp/1593274076
This is not really a "free" course, but book is good and translated to a lot of languages (if English is a concern).
It starts from the most basic programming concepts.
Last week with my current employer before I'm on a two week vacation. I have plans to do a lot of down-sizing (got many items to list on amazon/craigslist that have just been sitting) and want to get through this book: https://www.amazon.com/Python-Crash-Course-Hands-Project-Based/dp/1593276036 to build up some skills before my new employment. Looking forward.
If you're just at conditionals, you'll get to structures and collections later.
This is actually a really good type of project for learning to program with. Your first program here is reasonable, but has a lot of areas of potential improvement (this is expected, you're just getting started). As you learn more about C++ you'll see how you can both simplify the program structure and make expanding the game much easier.
There's a book Beginning C++ Through Game Programming, I'm not familiar with this 2014 edition, hopefully it's been updated to C++11. I (when learning a different programming language) had worked through the equivalent of it in Ada and found the overall structure to be sound so I feel comfortable recommending it without having read it myself (though now I'm looking through my various resources to see if I can get a digital copy through one of the office's digital library services).
The games are all text based which is in line with what you've started here. If you work through it and continue developing this program as you learn more C++ you'll get a pretty decent game by the end.
Pick up the book “Automate the boring stuff”
And steal a project from there. The draw of python is you can make something useful fairly early on in the learning process.
Edit: I’de go with web scraping. Providing everyone with how to implement the shell functionality described in the book, and see what they come up with as far as a useful web scraper as your open ended requirement.
While C++ is a very widely-used and versatile language, I wouldn't recommend it as the first language to learn for an absolute beginner, especially for learning on their own.
Python is also extremely versatile and it's super beginner-friendly but definitely not a "toy", people use it for all sorts of things.
I'd highly recommend this book (Automate the Boring Stuff with Python) because it's well-written and dives into everyday scenarios quickly:
https://www.amazon.com/Automate-Boring-Stuff-Python-2nd/dp/1593279922/
There's a book Beginning C++ Through Game Programming. Teaches C++ with text based games. May be a useful start.
I've only just started learning too, but I've been using a book called Python Crash Course by Eric Matthes. It's really good if you're a beginner, like me.
https://amazon.co.uk/dp/1593279280/ref=cm_sw_r_cp_apa_fab_LPgzFbZSRVVY4
I keep recommending this book to people, and think it’s right up your alley:
Automate the Boring Stuff with Python: Practical Programming for Total Beginners https://www.amazon.com/dp/1593275994/
I love programming and have been doing it for almost 20 years semi- or fully-professionally. I still love the hell out of it even all these years later. I’d even say this is the best time ever to get into it.
Here's a really good one! I've heard some really good things about this book which will get you up to speed quickly. It's called "Python Crash Course." Out of 5,000 reviews, it's the number 1 Best Seller. I've included a link here: https://www.amazon.com/Python-Crash-Course-2nd-Edition/dp/1593279280/ref=sr_1_5?dchild=1&keywords=python+programming&qid=1627997033&sr=8-5
If even the the beginner courses/books go too fast for you or you feel they assume too much prior knowledge, dumb it down further. Go for some resources/books designed to teach kids how to program. Eg. something like this: https://www.amazon.com/dp/1593274076/ref=emc_b_5_t
Don't feel stupid, because it's something designed for kids, everyone has their own starting point. Put in the effort to learn and you will see results soon. Good luck!
Hey, I'm a CS sophomore right now at a community college and here's my take on it:
If you're set on learning C and C++ make sure you find a program at a school that incorporates that. My semester currently is Machine Archtecture (some c++), Programming Concepts (python), and Programming in C. So if you have a local college or have one in mind to attend online, make sure you look at their courses, and inquire with the advisors at that school with any questions.
Yes to reading books, always helps. Youtube is always a friend as well but if you prefer reading you could start with
https://www.amazon.com/Programming-Absolute-Beginners-Guide-3rd/dp/0789751984
Just to explain my distaste with that exercise more clearly: It's completely focused on typing an abstract mathematical expression correctly, with no regard to how it could be useful in an actual program (there aren't many programs where it would be useful).
It's emphasizing the notion that code works like a magic spell, which any programming teacher is working actively to dispel in the beginning.
Here's a great book in Python: https://www.amazon.com/Python-Kids-Playful-Introduction-Programming/dp/1593274076
Python is a real programming language, and the book focuses on how to make real software like games and simulations.
If you really want your kid to learn, I recommend learning with them. It's unlikely that they will learn the skill without a teacher. Expecting that is like expecting a child to pick up carpentry on their own. Teenage carpenters usually learned it from a family member.
For Python Python Crash Course, 2nd Edition: A Hands-On, Project-Based Introduction to Programming is good book for Python for people without previous programming experience.
Python Crash Course, 2nd Edition: A Hands-On, Project-Based Introduction to Programming is good book for Python for people without previous programming experience. If you understand (by understand I mean understand the code and how and why it works, you may not memorize everything reading it at first and memorizing everything should not be your goal) everything in it I recommend The Quick Python Book 3rd Edition by Naomi Ceder. If you start with "The Quick Python Book" and do not understand it then read "Python Crash Course" first. "Fluent python" is more advanced book that you can read after those 2 books.
Also very important is practice. Try to create anything (anything that you want) by yourself. Right books + practice is a key.
I mean, I loved my high school's C++ and Java classes. I'd previously tried to teach myself and couldn't wrap my head around it, but my high school teacher did great. The only thing I taught myself is Python, and I think this was the book I used (I borrowed it from my college prof, so I'm not 100% sure):
https://www.amazon.com/Learning-Python-5th-Mark-Lutz/dp/1449355730/
Hi, as you can probably imagine, there's a ton of resources out there. Personally, I completed the free parts of Dataquest's Python path just to get a feel for it then continued self-studying using youtube and books. Also, like many others here, I also bought and benefited from 'Automate the Boring Stuff with Python' by Al Sweigart' so you might want to check it out as well. https://www.amazon.com/Automate-Boring-Stuff-Python-Programming/dp/1593275994
Yeah, it's a text book, and it's not actually Automate the boring stuff, it's Python Crash Course here both books look the same as I have both, but this one is chapter by chapter the same as the class.
Thanks for the heads on up 225. I keep hearing that it's a heavy workload type class. I'm not looking forward to that. Thanks!
There are 2 common books that people recommend: 1. Automate the Boring Stuff with Python 2. Python Crash Course
Automate the Boring Stuff (ATBS) is free on its website, but author specifically said he teaches 'bad' practices so beginners have an easier time. Because of this, I chose Python Crash Course (PCC) over it, I am currently chapter 7 out of 20. So far it is pretty good, the author put in exercises at every subsection you get plenty of practice. At the end, you will do 3 big projects with him, I am not there yet, so I can't comment on how much he guides you through it.
After PCC, I'll go to ATBS. Going by ATBS' index, it is quite practical-oriented so you are able to build custom scripts to save yourself time over repetitive computer tasks.
>or I am doing something wrong?
Well, yes you're doing something wrong, just adding a dictionary with headers in your script doesn't really do anything if you don't tell requests that you want to use them.
For amazon, it's always a good idea to also add a referer to make them think that google sent you there.
Try this
from bs4 import BeautifulSoup import requests headers = { 'User-Agent': 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.36', 'referer': 'https://google.com', } res = requests.get('https://www.amazon.com/Automate-Boring-Stuff-Python-Programming/dp/1593275994', headers=headers) res.raise_for_status()
I fiddled around with the code you provided and found a few things:
However, since we want this to work all the time, we've got to be more sneaky. I know you mentioned you tried Selenium and still didn't have luck, but I tried anyway and had much more success. It seems Amazon is unable to tell that my webdriver is being controlled by a script. Interestingly, when I got the page source here it was parsed just fine by any parser. I'm not sure why that is.
Here's the code I used. YMMV depending on what webdriver you have installed, but let me know if this helps at all! If not, hopefully we can troubleshoot it :)
from bs4 import BeautifulSoup from selenium import webdriver
browser = webdriver.Chrome() browser.get(url)
content = browser.page_source
soup = BeautifulSoup(content, "html.parser") title = soup.find(id="productTitle")
print(title)
browser.close()
For me, this outputs <span class="a-size-extra-large" id="productTitle">Learning Python, 5th Edition</span>
as expected.
Mark Lutz has some great books on Python programming. The most recent 5th edition is a great resource and asset for any python programmer.