You are here

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

By Yue Zhang (auth.)

This e-book introduces Python programming language and basic strategies in algorithms and computing. Its audience contains scholars and engineers with very little history in programming, who have to grasp a realistic programming language and research the elemental considering in computing device science/programming. the most contents come from lecture notes for engineering scholars from all disciplines, and has acquired excessive rankings. Its fabrics and ordering were adjusted many times in accordance with school room reception. in comparison to substitute textbooks available in the market, this publication introduces the underlying Python implementation of quantity, string, record, tuple, dict, functionality, category, example and module gadgets in a constant and easy-to-understand manner, making task, functionality definition, functionality name, mutability and binding environments comprehensible inside-out. via giving the abstraction of implementation mechanisms, this publication builds a pretty good knowing of the Python programming language.

Show description

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

Best introductory & beginning books

Objective-C for Absolute Beginners

You have got an excellent inspiration for an app, yet the place do you start? Objective-C is the common language of iPhone, iPad, and Mac apps, and Objective-C for Absolute rookies, moment variation begins you at the route to learning this language and its most recent liberate. utilizing a hands-on process, youll methods to imagine in programming phrases, find out how to use Objective-C to build software common sense, and the way to synthesize all of it into operating apps.

Introduction to Assembly Language Programming: From 8086 to Pentium Processors

This textbook introduces the reader to meeting language programming and its position in laptop programming and layout. the writer concentrates on protecting the 8086 family members of processors as much as and together with the Pentium. the focal point is on supplying scholars with a company clutch of the most positive factors of meeting programming, and the way it may be used to enhance a computer's functionality.

An Introduction to Medieval Philosophy: Basic Concepts

By way of exploring the philosophical personality of a few of the best medieval thinkers, An advent to Medieval Philosophy presents a wealthy review of philosophy on this planet of Latin Christianity. Explores the deeply philosophical personality of such medieval thinkers as Augustine, Boethius, Eriugena, Anselm, Aquinas, Bonaventure, Scotus, and Ockham stories the relevant gains of the epistemological and metaphysical challenge of universals indicates how medieval authors tailored philosophical principles from antiquity to use to their spiritual commitments Takes a wide philosophical technique of the medieval period by,taking account of classical metaphysics, normal tradition, and spiritual issues

Extra info for An Introduction to Python and Computer Programming

Sample text

S = " abc \ ndef \ nghi " >>> s ’ abc \ ndef \ nghi ’ In the example above, the two-character sequence ‘\n’, is used in the literal explicitly to represent a new-line character. e. not escaped) line breaks are not allowed in string literals with single or double quotes. Another escape character that has an escape form is the tab character, which can be written as ‘\t’. > > > s = ’ abc def ghi ’ >>> s ’ abc \ tdef \ tghi ’ In the example above, the string s contains two explicit tab characters, which are shown in escaped forms by Python.

Note that different from the case of the print statement, raw_input(“Enter a string:”) is a function call. It forms an expression on the right hand side of an assignment statement in the example above, and is evaluated to a string object. g. “Enter a string:”), which is used for console prompt only. This behavior is rather different from the round, len and int function calls, which are all numerical and do not affect the execution of IDLE. However, it remains true that all function calls are expressions that evaluate to a Python object.

The return value of this function is always a string, and therefore type conversion is necessary when the desired object is an integer, a floating point number or other types. An alternative function for text console input is input, which performs type conversion implicitly. The input function is implemented by adding an automatic type conversion step after a raw_input step. In effect, the function receives a literal from the user, and converts it to a Python object as the return value. 1 Text Input and Output Using Strings 49 In the example above, the input function is called with the “x=” prompt being displayed.

Download PDF sample

Rated 4.88 of 5 – based on 6 votes