background preloader

Python Course

Python Course
Uta Priss This is a generic version of a class "Computer Programming for Information Management" that I taught twice a year at the School of Library and Information Science, Indiana University Bloomington. The materials in this course are mostly self-explanatory and can be used for self study. (There are some references in the materials to Indiana University accounts and settings which should be ignored.) Notes: 1) The materials in this course are copyrighted. 2) Please only contact me in case you find errors in the text or have comments. 3) I will not be responsible for any possible damage that any of the scripts and exercises in this course may have. Week 1. ExercisesAnswers Week 2.

A Python Book: Beginning Python, Advanced Python, and Python Exercises 2.2 Regular Expressions For more help on regular expressions, see: 2.2.1 Defining regular expressions A regular expression pattern is a sequence of characters that will match sequences of characters in a target. The patterns or regular expressions can be defined as follows: Literal characters must match exactly. Because of the use of backslashes in patterns, you are usually better off defining regular expressions with raw strings, e.g. r"abc". 2.2.2 Compiling regular expressions When a regular expression is to be used more than once, you should consider compiling it. import sys, re pat = re.compile('aa[bc]*dd') while 1: line = raw_input('Enter a line ("q" to quit):') if line == 'q': break if pat.search(line): print 'matched:', line else: print 'no match:', line Comments: We import module re in order to use regular expresions.re.compile() compiles a regular expression so that we can reuse the compiled regular expression without compiling it repeatedly. 2.2.3 Using regular expressions Notes:

ICFP Programming Contest The ICFP Programming Contest is an international programming competition held annually around June or July since 1998, with results announced at the International Conference on Functional Programming. Teams may be of any size and any programming language(s) may be used. There is also no entry fee. Participants have 72 hours to complete and submit their entry over the Internet. There is often also a 24-hour lightning division. The contest usually have around 300 submitted entries.[1][2] Past tasks[edit] Prizes[edit] Prizes have a modest cash value, primarily aimed at helping the winners to attend the conference, where the prizes are awarded and the judges make the following declarations: First prize [Language 1] is the programming tool of choice for discriminating hackers. Second prize [Language 2] is a fine programming tool for many applications. Third prize [Language 3] is also not too shabby. Winner of the lightning division [Language L] is very suitable for rapid prototyping. Judges' prize

BeginnersGuide/Programmers This is a Wiki page. Users with edit rights can edit it. You are, therefore, free to (in fact, encouraged to) add details of material that other Python users will find useful. A beginner-friendly Python tutorial that starts with the absolute basics but also covers more advanced stuff like Python software deployment. SingPath - The most fun way to practice Python. Welcome to SingPath ... the website for practicing and having fun with Python. Learning Python is a skill. It takes practice, not just an understanding of the theory. Just start with the first problemset on one of the paths and the game will automatically ask you the next problem that you haven't solved. Contributions of new problems are welcome. Don't wait for others to add problems. Many thanks to Nick Parlante for his excellent JavaBat.com, the inspiration for this website and thank you to David MacQuigg and Athar Hameed for their excellent port to the Google App Engine. Credits: Sandra Boesch, PhD Founder Contact info: PivotalExpert at gmail dot com

Python Programming Language – Official Website Best of Sublime Text 3: Features, Plugins, and Settings Related Course Get Started with JavaScript for Web Development JavaScript is the language on fire. Sublime Text 3 is an amazing piece of software. I know there have already been many articles like this online, but I am teaching a class on Sublime Text and thought it would be good to have all the information online. # Features Command Palette ctrl + shift + p The command palette let’s you access pretty much anything in the settings menus, call your package commands, change file syntax, handle Sublime projects, and so much more. For instance, you are able to call Git commands add, branch, commit, push, and pull all from the command palette. To Use: ctrl + shift + p File Switching ctrl + p Sublime Text provides a really fast way to open up new files. To Use: ctrl + p Goto Symbols ctrl + r When you have a large file with a bunch of methods, pressing ctrl + r will list them all and make them easier to find. Sublime Text 3 also has a new feature (Goto Definition). Multi-Edit ctrl + click Snippets Emmet

10 Free Python Programming Books Below is a collection of 10 great Python programming books that are available online in full, completely free of charge: Dive into Python This is a fantastic book that is also available in print . It covers everything, from installing Python and the language's syntax, right up to web services and unit testing. An Introduction to Tkinter Tkinter is a popular cross-platform Python GUI toolkit, and this book provides a good introduction with lots of examples. How to think like a Computer Scientist This book uses Python to explain some Computer Science principals. The Standard Python Library This book provides a detailed description and usage examples for all of the modules in Python's standard library. Invent Your Own Computer Games with Python This book is aimed at novice programmers who are interested in writing simple computer games. The Django Book Django is a Python web framework (similar to Ruby's Rails) which "encourages rapid development and clean, pragmatic design". The Pylons Book too.

Uta Priss, that is the author, didn't mention any IDE on her course. The IDE shouldn't be a problem though, but still, if you are a novice learner, you shouldn't use any IDE at all. The old school notepad++ and python from command line should be best for you, because in that way you will be acquainted with how the program actually works.

Thank you for the suggestion :D I will check it right away! by minhazr Sep 19

minhazr,
I don't realy recall the error, I solved the problem by changing the ide. I was using the one that the instrutor remcomended.
I'm takeing an online python course Allison.com. You can check them out there.
Stanley. by stanleyvenable Sep 19

Sorry for late reply :)
Anyways, can you tell what the error exactly is?
Did you run the program on command line with this format? -
python hello.py
Let me remind you that you shouldn't use any IDE when you are learning a new programming language, unless your instructor or the books you are following says so. by minhazr Sep 18

I didn't find it very helpfull in that the second kept producing an error even when copied and pasted. This I think is due to an ide that is probalbly not the one they used. Still this tutorial and others seem to assume you have of can find an ide that works with there programing without there specifying what it should be.
I was using python 2.7 idle and pyscripter. by stanleyvenable Sep 17

Related: