![]() |
|
[Python] Would you consider this beginner level code? - Printable Version +- Hack Forums (https://hackforums.net) +-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444) +--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151) +---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118) +---- Thread: [Python] Would you consider this beginner level code? (/showthread.php?tid=4690723) |
Would you consider this beginner level code? - SuperHydra - Feb 17, 2015 My friends computer science course at university covers everything like Python, Java, C++, networking, databases etc. Before he went to university he had never done any programming before. His Python assignment was due in December and his course only started in August so that's about 4 months of programming. He showed me the source code for his assignment (Hangman) and I am just stunned... I have been teaching myself Python for about 3 months and I could never produce something as good at what he can do. I honestly feel like I must have down-syndrome or something, how is he learning so fast compared to me? He says that this Hangman game is considered a beginner level program and something you would expect someone with 3 or 4 months to be able to produce. Is he right? The code just looks so elegant and some parts I don't even know how to read, let alone have the ability to write it myself. I feel like I am learning so slowly... Do you think this is the sort of program someone should be able to produce after just 3 - 4 months? Here is the source code pastebin[dot]com/D2xgn1XW 3 months in and I am still "experimenting" with lists, classes and functions etc and some of the stuff in that program I have never ever seen before. 🤨 * - sonax - Feb 17, 2015 One small note: You don't need to use "Str1: {0} {1} .... {n}".format(0, 1, 2, .... n). That was a limitation in py 3.1(if i remember correctly). Heres the (new) way: print("{} {} {} {} {}".format(*list(range(5)))) But thats offtopic. * - SuperHydra - Feb 17, 2015 (Feb 17, 2015 12:33 PM)sonax Wrote: One small note: This is not my program. It's my friends. * - Rorikstead - Feb 17, 2015 He's probably advancing faster than you because he's taking a course. Not only is a class organized for quick and comprehensive learning, but he can ask the professor questions instead of spending time trying to figure it out himself. Also, now that I'm reading the code, it looks like he was told what to write. By that I mean that the assignment probably said, "Make this class with this many arguments, make these functions, make them do these things" etc. When something gives you specific information like that, it's much easier to write code for it. * - SuperHydra - Feb 17, 2015 (Feb 17, 2015 01:09 PM)Rorikstead Wrote: He's probably advancing faster than you because he's taking a course. Yeah that is exactly what he told me. The assignment details told him to make certain functions and to do certain things etc but all the code is entirely his own. No template given to him. I guess I just need to be a bit more patient with my slow learning. * - Rorikstead - Feb 17, 2015 (Feb 17, 2015 01:30 PM)SuperHydra Wrote: Yeah that is exactly what he told me. The assignment details told him to make certain functions and to do certain things etc but all the code is entirely his own. No template given to him. I guess I just need to be a bit more patient with my slow learning. Spend more time learning new things, read as much as you can, and practice writing your own code. The more you do with programming the faster you'll pick it up. I spent the better part of a year fully grasping programming. That being said, I did it on my own without reading anything except documentation. I did watch a lot of tutorials though. * - MR.FREE - Feb 17, 2015 (Feb 17, 2015 12:15 PM)SuperHydra Wrote: I honestly feel like I must have down-syndrome or something, how is he learning so fast compared to me? He says that this Hangman game is considered a beginner level program and something you would expect someone with 3 or 4 months to be able to produce. Is he right? OP ive been messing around here and there with programming for 4 years now and still have no idea what im doing. when I first started I picked up the basics very quickly but just couldnt program. I think alot of it has to do with confidence and practicing(fixing problems/making stuff work) As soon as you find something that you really want to create, programming will start becoming easier imo. ive been scripting on and off for 4 years and some of HF members would probably think my code is retarded. This was my first real attempt at something beside a calc, I eventually got busy and forgot about it. Spoiler (Click to View) Ive read several beginner books, watched tons of video tutorials. It all means nothing without writing out code on a daily base Have you tryed Code Academy by any chance? I send all my friends there first * - SIM-574702 - Feb 17, 2015 (Feb 17, 2015 01:30 PM)SuperHydra Wrote: Yeah that is exactly what he told me. The assignment details told him to make certain functions and to do certain things etc but all the code is entirely his own. No template given to him. I guess I just need to be a bit more patient with my slow learning. Getting those parameters for functions helps a lot for beginners. It guides you through planning functions and the way they will work. Also if he's taking a course he probably takes it more seriously than you do. * - Misingnoglic - Feb 17, 2015 There's some tricky syntax, but honestly there's really nothing here that's too crazy. If you think you can't do something like this, study it and ask your friend questions about it, and then you will learn tons from it :) don't get discouraged * - clark.dll - Feb 17, 2015 IMO, Learning any kind of programming language in a classroom with both a teacher and your peers to speak with is infinitely easier than learning on your own because clarification can be so hard to find on the internet. In a classroom setting you can have everything sorted out in minutes with the help of your teachers/buddies. He's also being told what to do and he probably doesn't understand everything that's going on within the code. I can say that because in my Java class that was the case with a lot of students, and come exam time they failed because they never grasped the underlying concepts. Don't put yourself down, just keep at it and don't worry about anybody's progress except your own. |