Python Programming Fundamentals (2nd ed.) [Lee 2015-01-08].pdf

(10087 KB) Pobierz
Undergraduate Topics in Computer Science
Series Editor
Ian Mackie
Undergraduate Topics in Computer Science (UTiCS) delivers high-quality instructional
content for undergraduates studying in all areas of computing and information science.
From core foundational and theoretical material to final-year topics and applications,
UTiCS books take a fresh, concise, and modern approach and are ideal for self-study or
for a one- or two-semester course. The texts are all authored by established experts in their
fields, reviewed by an international advisory board, and contain numerous examples and
problems. Many include fully worked solutions.
More information about this series at http://​www.​springer.​com/​series/​7592
Kent D. Lee
Python Programming Fundamentals
2nd ed. 2014
Kent D. Lee
Luther College, Decorah, IA, USA
ISSN 1863-7310 e-ISSN 2197-1781
ISBN 978-1-4471-6641-2 e-ISBN 978-1-4471-6642-9
DOI 10.1007/978-1-4471-6642-9
Springer London Heidelberg New York Dordrecht
Library of Congress Control Number: 2014956498
© Springer-Verlag London 2014
This work is subject to copyright. All rights are reserved by the Publisher, whether the
whole or part of the material is concerned, specifically the rights of translation, reprinting,
reuse of illustrations, recitation, broadcasting, reproduction on microfilms or in any other
physical way, and transmission or information storage and retrieval, electronic adaptation,
computer software, or by similar or dissimilar methodology now known or hereafter
developed.
The use of general descriptive names, registered names, trademarks, service marks, etc. in
this publication does not imply, even in the absence of a specific statement, that such
names are exempt from the relevant protective laws and regulations and therefore free for
general use.
The publisher, the authors and the editors are safe to assume that the advice and
information in this book are believed to be true and accurate at the date of publication.
Neither the publisher nor the authors or the editors give a warranty, express or implied,
with respect to the material contained herein or for any errors or omissions that may have
been made.
Printed on acid-free paper
Springer-Verlag London Ltd. is part of Springer Science+Business Media
(www.springer.com)
Preface
Computer Science is a creative, challenging, and rewarding discipline. Computer
programmers, sometimes called software engineers, solve problems involving data:
computing, moving, and handling large quantities of data are all tasks made easier or
possible by computer programs. Money magazine ranked software engineer as the number
one job in America in terms of flexibility, creativity, low stress levels, ease of entry,
compensation, and job growth within the field [4].
Learning to program a computer is a skill that can bring you great enjoyment because
of the creativity involved in designing and implementing a solution to a problem. Python
is a good first language to learn because there is very little overhead in learning to write
simple programs. Python also has many libraries available that make it easy to write some
very interesting programs including programs in the areas of Computer Graphics and
Graphical User Interfaces: two topics that are covered in this text.
In this text, students are taught to program by giving them many examples and
practice exercises with solutions that they can work on in an interactive classroom
environment. The interaction can be accomplished using a computer or using pen and
paper. By making the classroom experience active, students reflect on and apply what they
have read and heard in the classroom. By using a skill or concept right away, students
quickly discover if they need more reinforcement of the concept, while teachers also get
immediate feedback. There is a big difference between seeing a concept demonstrated and
using it yourself and this text encourages applying concepts immediately to test
understanding. This is vital in Computer Science since new skills and concepts build on
what we have already learned.
In several places within this book there are examples presented that highlight patterns
of programming. These patterns appear over and over in programs we write. In this text,
patterns like the Accumulator Pattern and the Guess and Check Pattern are presented and
exercises reinforce the recognition and application of these and other abstract patterns
used in problem-solving. Learning a language is certainly one important goal of an
introductory text, but acquiring the necessary problem-solving skills is even more
important. Students learn to solve problems on their own by recognizing when certain
patterns are relevant and then applying these patterns in their own programs.
Recent studies in Computer Science Education indicate the use of a debugger can
greatly enhance a student’s understanding of programming [1]. A debugger is a tool that
lets the programmer inspect the state of a program at any point while it is executing. There
is something about actually seeing what is happening as a program is executed that helps
make an abstract concept more concrete. This text introduces students to the use of a
debugger and includes exercises and examples that show students how to use a debugger
to discover how programs work.
There are additional resources available for instructors teaching from this text. They
include lecture slides and a sample schedule of lectures for a semester long course.
Solutions to all programming exercises are also available upon request. Visit
http://​cs.​
luther.​edu/​~leekent/​CS1 for more information.
Zgłoś jeśli naruszono regulamin