Jump to content


 


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Photo

Python code examples w/ 500+ lines


  • Please log in to reply
2 replies to this topic

#1 ozzynotwood

ozzynotwood

  • Members
  • 24 posts
  • OFFLINE
  •  
  • Gender:Male
  • Local time:02:23 PM

Posted 11 November 2017 - 08:13 PM

Hi everyone, I'm learning Python 3 and I want to try a learning technique that I saw someone using. This technique will be added.to my study routine, not replace.

 

I want to print out an existing program and type it back in, that's it, it would just be something extra to do on a Sunday morning, if it makes no difference then no loss. What I do need is existing code. I'm having trouble finding completed code with 500+ lines.

 

Can anybody direct me to a site where I might find something suitable for this task?

 

Thanks!

 

JC



BC AdBot (Login to Remove)

 


#2 KingDavidlll

KingDavidlll

  • Malware Study Hall Junior
  • 297 posts
  • OFFLINE
  •  
  • Gender:Male
  • Local time:02:23 PM

Posted 11 November 2017 - 08:24 PM

Searching for what you want in a program and putting github in the search as well will provide you with much better results rather than example program. Simple examples of python scripts with a large variety of keywords can easily be found in simple games in my opinion. The link won't have 500 lines in one file however it will have over 500 lines in all of the files, and teach you how programs should be structured (although I haven't necessarily looked at the code to see if it's well written).

https://github.com/aqisnotliquid/python_rpg

I honestly think it's better to be given a task and use example code and modify it to be a better use of time rather than just copying like for like.

#3 magiclcj

magiclcj

  • Members
  • 5 posts
  • OFFLINE
  •  
  • Local time:11:23 PM

Posted 17 April 2018 - 08:45 AM

KingDavidIII probably has the best idea.

 

Al Sweigart has written a few book about learning with python. https://inventwithpython.com/ Most are free online. Each book has a theme for certain programs. They won't be 500  lines, but each program has a theme which will help you recognize why parts of the code are there.






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users