Introductory Beginning

An Introduction to Python and Computer Programming by Yue Zhang (auth.)

By Yue Zhang (auth.)

This ebook introduces Python programming language and primary options in algorithms and computing. Its audience comprises scholars and engineers with very little historical past in programming, who have to grasp a realistic programming language and study the fundamental pondering in laptop science/programming. the most contents come from lecture notes for engineering scholars from all disciplines, and has bought excessive scores. Its fabrics and ordering were adjusted many times in line with school room reception. in comparison to substitute textbooks available in the market, this e-book introduces the underlying Python implementation of quantity, string, record, tuple, dict, functionality, classification, example and module gadgets in a constant and easy-to-understand manner, making project, functionality definition, functionality name, mutability and binding environments comprehensible inside-out. by way of giving the abstraction of implementation mechanisms, this publication builds a superior figuring out of the Python programming language.

Show description

Read Online or Download An Introduction to Python and Computer Programming PDF

Best introductory & beginning books

Beginning Visual Basic 2005

* After a quick creation to visible Studio 2005 and the . internet Framework, the professional authors introduce readers to the basics of the visible simple 2005 language * End-of-chapter routines support readers to quick learn how to construct wealthy and professional-looking purposes for Microsoft home windows, intranets and the net, and cellular units * bargains thorough assurance of the recent visible Studio 2005 instruments and contours * Covers object-oriented programming, developing customized controls, operating with databases, growing menus, and dealing with portraits * Addresses development category libraries, net prone and .

Teach Yourself Internet Game Programming with Java in 21 Days

Video game builders will flip to this ebook for the most recent info on online game programming expertise. It indicates intimately how you can use Java to application video games for interactive use on the web and world-wide-web. because the internet represents the subsequent evolutionary step for online game programming, this ebook is bound to be successful.

Additional info for An Introduction to Python and Computer Programming

Example text

Cascaded assignments. Several assignment statements to the same value can be cascaded into a single line. For example, a = 1 and b = 1 can be cascaded into a = b = 1. 2 The Underlying Mechanism Floating point arithmatic can be inaccurate in calculators; the same happens in Python. 2999999999999998 In both cases, the expression is evaluated to an imprecise number. The main reason is limitation of memory space. A floating point number can contain an infinite amount of information, if there is an infinite number of digits after the decimal point.

It deletes the identifier from the binding table. As the second last command shows, Python reports a name error when the value of x is requested after the identifier x has been deleted from the binding table. After an identifier is deleted, the objected that it is bounded to is not deleted immediately. Instead, the garbage collector will remove it later when no other identifiers are bound to it. Each Python object has a unique identify, which is typically its memory address. Python provides a function, id, which takes a Python object as its input argument, and returns the identify of the object.

Different from the left-to-right slicing, when slicing from right to left, indices indicate locations after corresponding characters. Similar to the left-to-right slicing, the absolute value of the step parameter specifies the interval at which characters are taken. For example, >>> s= ’ abcdef ’ > > > s [5:2: -1] ’ fed ’ > > > s [:2: -1] ’ fed ’ > > > s [:: -1] ’ fedcba ’ > > > s [:: -2] ’ fdb ’ # 5, 4, 3 An important function that is associated with strings is len, which takes a single string argument and returns the number of characters in the string.

Download PDF sample

Rated 4.79 of 5 – based on 6 votes