100% de satisfacción garantizada Inmediatamente disponible después del pago Tanto en línea como en PDF No estas atado a nada 4,6 TrustPilot
logo-home
Notas de lectura

starting out with phyton

Puntuación
-
Vendido
-
Páginas
886
Subido en
07-03-2023
Escrito en
2021/2022

this is a lecture note of science computure (starting out with phyton)

Institución
Grado











Ups! No podemos cargar tu documento ahora. Inténtalo de nuevo o contacta con soporte.

Escuela, estudio y materia

Institución
Estudio
Desconocido
Grado

Información del documento

Subido en
7 de marzo de 2023
Número de páginas
886
Escrito en
2021/2022
Tipo
Notas de lectura
Profesor(es)
Tony gaddis
Contiene
Todas las clases

Temas

Vista previa del contenido

, Contents in a Glance

Preface   xiii
Chapter 1 Introduction to Computers and Programming 1
Chapter 2 Input, Processing, and Output 31
Chapter 3 Decision Structures and Boolean Logic 119
Chapter 4 Repetition Structures 169
Chapter 5 Functions 219
Chapter 6 Files and Exceptions 303
Chapter 7 Lists and Tuples 361
Chapter 8 More About Strings 431
Chapter 9 Dictionaries and Sets 467
Chapter 10 Classes and Object-Oriented Programming 521
Chapter 11 Inheritance 583
Chapter 12 Recursion 609
Chapter 13 GUI Programming 629
Chapter 14 Database Programming 717
Appendix A Installing Python 799
Appendix B Introduction to IDLE 803
Appendix C The ASCII Character Set 811
Appendix D Predefined Named Colors 813
Appendix E More About the import Statement 819
Appendix F Formatting Numeric Output with the format() Function 823
Appendix G Installing Modules with the pip Utility 829
Appendix H Answers to Checkpoints 831
Index 853
Credits 869 v




A01_GADD9032_05_SE_FM.indd 5 11/12/19 2:31 PM

, Contents

Preface    xiii

Chapter 1 Introduction to Computers and Programming 1
1.1 Introduction 1
1.2 Hardware and Software 2
1.3 How Computers Store Data 7
1.4 How a Program Works 12
1.5 Using Python 20
Review Questions 24

Chapter 2 Input, Processing, and Output 31
2.1 Designing a Program 31
2.2 Input, Processing, and Output 35
2.3 Displaying Output with the print Function 36
2.4 Comments 39
2.5 Variables 40
2.6 Reading Input from the Keyboard 49
2.7 Performing Calculations 53
2.8 String Concatenation 65
2.9 More About the print Function 67
2.10 Displaying Formatted Output with F-strings 70
2.11 Named Constants 80
2.12 Introduction to Turtle Graphics 81
Review Questions 109
Programming Exercises 114

Chapter 3 Decision Structures and Boolean Logic 119
3.1 The if Statement 119
3.2 The if-else Statement 128
3.3 Comparing Strings 131
3.4 Nested Decision Structures and the if-elif-else Statement 135
3.5 Logical Operators 143
3.6 Boolean Variables 149
3.7 Turtle Graphics: Determining the State of the Turtle 150
Review Questions 158
Programming Exercises 161

vii




A01_GADD9032_05_SE_FM.indd 7 11/12/19 2:31 PM

, viii Contents

Chapter 4 Repetition Structures 169
4.1 Introduction to Repetition Structures 169
4.2 The while Loop: A Condition-Controlled Loop 170
4.3 The for Loop: A Count-Controlled Loop 178
4.4 Calculating a Running Total 189
4.5 Sentinels 192
4.6 Input Validation Loops 195
4.7 Nested Loops 200
4.8 Turtle Graphics: Using Loops to Draw Designs 207
Review Questions 211
Programming Exercises 213

Chapter 5 Functions 219
5.1 Introduction to Functions 219
5.2 Defining and Calling a Void Function 222
5.3 Designing a Program to Use Functions 227
5.4 Local Variables 233
5.5 Passing Arguments to Functions 236
5.6 Global Variables and Global Constants 246
5.7 Introduction to Value-Returning Functions:
Generating Random Numbers 250
5.8 Writing Your Own Value-Returning Functions 261
5.9 The math Module 274
5.10 Storing Functions in Modules 277
5.11 Turtle Graphics: Modularizing Code with Functions 283
Review Questions 289
Programming Exercises 294

Chapter 6 Files and Exceptions 303
6.1 Introduction to File Input and Output 303
6.2 Using Loops to Process Files 321
6.3 Processing Records 328
6.4 Exceptions 341
Review Questions 354
Programming Exercises 358

Chapter 7 Lists and Tuples 361
7.1 Sequences 361
7.2 Introduction to Lists 361
7.3 List Slicing 370
7.4 Finding Items in Lists with the in Operator 373
7.5 List Methods and Useful Built-in Functions 375
7.6 Copying Lists 382
7.7 Processing Lists 383
7.8 List Comprehensions 397
7.9 Two-Dimensional Lists 399
7.10 Tuples 404
7.11 Plotting List Data with the matplotlib Package 406
Review Questions 423
Programming Exercises 426




A01_GADD9032_05_SE_FM.indd 8 11/12/19 2:31 PM
$7.99
Accede al documento completo:

100% de satisfacción garantizada
Inmediatamente disponible después del pago
Tanto en línea como en PDF
No estas atado a nada

Conoce al vendedor
Seller avatar
kevinfrient

Conoce al vendedor

Seller avatar
kevinfrient All
Seguir Necesitas iniciar sesión para seguir a otros usuarios o asignaturas
Vendido
0
Miembro desde
2 año
Número de seguidores
0
Documentos
1
Última venta
-

0.0

0 reseñas

5
0
4
0
3
0
2
0
1
0

Recientemente visto por ti

Por qué los estudiantes eligen Stuvia

Creado por compañeros estudiantes, verificado por reseñas

Calidad en la que puedes confiar: escrito por estudiantes que aprobaron y evaluado por otros que han usado estos resúmenes.

¿No estás satisfecho? Elige otro documento

¡No te preocupes! Puedes elegir directamente otro documento que se ajuste mejor a lo que buscas.

Paga como quieras, empieza a estudiar al instante

Sin suscripción, sin compromisos. Paga como estés acostumbrado con tarjeta de crédito y descarga tu documento PDF inmediatamente.

Student with book image

“Comprado, descargado y aprobado. Así de fácil puede ser.”

Alisha Student

Preguntas frecuentes