Programming 101 with Python: an open-source, cross-platform, and fun language By J. Burton Browning, Ed.D. Copyright В© J. Burton Browning All rights reserved. If you use all or part of this work, please email or contact me with details. Today we will discuss: вЂў Overview of my book as course text and history of the language вЂў A few basic features with Python вЂў Advanced features of PythonвЂ”not just an introductory language! History вЂў Developed by Guido van Rossum 1990 вЂў Actively maintained by him and others вЂў New features and extensions added all the time вЂў Many books and websites with information вЂў Name is based on Monty Python and not a large snake! вЂў вЂў вЂў вЂў вЂў вЂў вЂў вЂў вЂў Python features Easy to learn Great for RAD Cross-platform and open-source Compile to *.exe GUI and other add-ins such as Pygame, Vpython, WX Windows, etc. Forces вЂњcleanвЂќ coding skills Syntax similar to C/C++ and JAVA вЂ“ can export to C Free and commercial tools available Used everywhere from application development and server scripting to teaching Course: Intro to Programming and Logic вЂў вЂў вЂў вЂў вЂў вЂў History of computers and programming Prototype solutions (flowchart and pseudocode) Program CLI applications Basic control structures Debugging Advanced topics: GUI design, Add-in SDKвЂ™s, COM integration, OOP, etc. Two modes of operation вЂў Built-in IDE вЂњIDLEвЂќ вЂў вЂњLine-by-lineвЂќ or interactive mode вЂў вЂњMulti-lineвЂќ or script mode вЂ“ can save programs for reuse вЂў Helloi.avi Variables and Math operators вЂў Variables are automatically вЂњtypedвЂќ to best fit. No variable declaration. вЂў Variables are immutable and not reused. вЂў Math operators similar to C++, JAVA, VB, etc. * = multiplication, + = addition, % modulus, etc. Comment statements вЂў Pound sign ( # ) is used for single line comments. вЂў Multi-line comments are wrapped in triple quoted strings. вЂњвЂќвЂќ any comments hereвЂ¦ вЂњвЂќвЂќ Examples Single selection structure and Statement blocks вЂў Handled by indentation вЂў Forces вЂњcleanвЂќ code writing вЂў Format specifiers similar to C++/JAVA Dual selection structure вЂў Similar to other languages вЂў Indentation defines statement blocks Multiple selection structure Similar to if, else if, else (could be switch or select case in other languages). elif is same as else if While вЂў Similar to loop in other languages For for x in range(10): print x name=вЂњSmithвЂќ for letter in name: print letter Functions вЂў def function_name(): any code for functionвЂ¦ Arrays вЂў Very rich collection of вЂњarray-likeвЂќ structures вЂў Lists, tuples, and dictionaries вЂў More powerful than a standard array вЂў Teach same principles вЂў Easy to learn and implement Dictionary example Class design вЂў Can declare classes in same file or separate file. вЂў Can focus on class design without other syntax issues associated with other languages. вЂў Put fun into class design! Class example GUI programming вЂў вЂў вЂў вЂў вЂў Free SDK pythoncard.sourceforge.net Similar to VB/VB.NET Cross-platform unlike Visual Basic! No special вЂњdot netвЂќ framework needed! Other GUI SDKвЂ™s available as well Pygame вЂў Free sdk from www.pygame.org for game/simulation development. вЂў Many good/free tutorials available. вЂў Open-source games you can modify. 3D Graphics/animation вЂў Vpython.org free 3d/animation sdk. вЂў Use for general graphics study or physics classes. More information вЂў вЂў вЂў вЂў вЂў www.python.org www.vpython.org www.pygame.org http://pythoncard.sourceforge.net/ http://www.activestate.com/products/komodo_ide/ Questions? Text: Design, Logic, and Programming with Python by James B. Browning www.iuniverse.com www.amazon.com Barnes and Noble Thank you and good luck!