楼主: alldoing1
796 3

A primer on scientific programming with Python_Third Edition 2012 [推广有奖]

  • 3关注
  • 15粉丝

已卖:7717份资源

副教授

28%

还不是VIP/贵宾

-

威望
0
论坛币
87975 个
通用积分
258.1915
学术水平
28 点
热心指数
34 点
信用等级
22 点
经验
18134 点
帖子
236
精华
0
在线时间
1123 小时
注册时间
2009-9-7
最后登录
2025-12-24

楼主
alldoing1 在职认证  发表于 2018-3-21 11:53:52 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

求职就业群
赵安豆老师微信:zhaoandou666

经管之家联合CDA

送您一个全额奖学金名额~ !

感谢您参与论坛问题回答

经管之家送您两个论坛币!

+2 论坛币
A primer on scientific programming with Python_Third Edition 2012
      The aim of this book is to teach computer programming using examples from mathematics and the natural sciences. We have chosen to use the Python programming language because it combines remarkable expressive power with very clean, simple, and compact syntax. Python is easy to learn and very well suited for an introduction to computer programming.Python is also quite similar to Matlab and a good language for doing mathematical computing. It is easy to combine Python with compiled languages, like Fortran, C, and C++, which are widely used languages for scientific computations. A seamless integration of Python with Java is offered by a special version of Python called Jython.

1 Computing with Formulas . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.1 The First Programming Encounter: A Formula . . . . . . . . 1
1.2 Computer Science Glossary . . . . . . . . . . . . . . . . . . . . . . . . . 14
1.3 Another Formula: Celsius-Fahrenheit Conversion . . . . . . 19
1.4 Evaluating Standard Mathematical Functions . . . . . . . . . 23
1.5 Interactive Computing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
1.6 Complex Numbers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
1.7 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
1.8 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
2 LoopsandLists. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
2.1 While Loops . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
2.2 Lists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
2.3 Alternative Implementations with Lists and Loops . . . . . 60
2.4 Nested Lists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
2.5 Tuples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
2.6 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
2.7 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
3 Functions and Branching . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
3.1 Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
3.2 Branching . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
3.3 Mixing Loops, Branching, and Functions in
3.4 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
3.5 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
4 Input Data and Error Handling . . . . . . . . . . . . . . . . . . . . . 137
4.1 Asking Questions and Reading Answers . . . . . . . . . . . . . . 138
4.2 Reading from the Command Line . . . . . . . . . . . . . . . . . . . 145
4.3 Handling Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152
4.4 A Glimpse of Graphical User Interfaces . . . . . . . . . . . . . . 158
4.5 Making Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161
4.7 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180
5 Array Computing and Curve Plotting . . . . . . . . . . . . . . . 187
5.1 Vectors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188
5.2 Arrays in Python Programs . . . . . . . . . . . . . . . . . . . . . . . . 193
5.3 Curve Plotting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198
5.4 Plotting Difficulties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215
5.5 More Advanced Vectorization of Functions . . . . . . . . . . . 219
5.6 More on Numerical Python Arrays . . . . . . . . . . . . . . . . . . 226
5.7 Higher-Dimensional Arrays . . . . . . . . . . . . . . . . . . . . . . . . . 231
5.8 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237
5.9 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243
6 Files, Strings, and Dictionaries . . . . . . . . . . . . . . . . . . . . . . 257
6.1 Reading Data from File . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257
6.2 Dictionaries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 266
6.3 Strings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 282
6.4 Reading Data from Web Pages . . . . . . . . . . . . . . . . . . . . . . 291
6.5 Writing Data to File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 296
6.6 Examples from Analyzing DNA . . . . . . . . . . . . . . . . . . . . . 305
6.7 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 323
6.8 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 329
7 Introduction to Classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 341
7.1 Simple Function Classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . 342
7.2 More Examples on Classes. . . . . . . . . . . . . . . . . . . . . . . . . . 356
7.3 Special Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 360
7.4 Example: Class for Vectors in the Plane . . . . . . . . . . . . . . 375
7.5 Example: Class for Complex Numbers . . . . . . . . . . . . . . . 379
7.6 Static Methods and Attributes . . . . . . . . . . . . . . . . . . . . . . 387
7.7 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 388
7.8 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 395
8 Random Numbers and Simple Games . . . . . . . . . . . . . . . 413
8.1 Drawing Random Numbers . . . . . . . . . . . . . . . . . . . . . . . . . 414
8.2 Drawing Integers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 420
8.3 Computing Probabilities . . . . . . . . . . . . . . . . . . . . . . . . . . . 428
8.4 Simple Games . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 442
8.5 Monte Carlo Integration . . . . . . . . . . . . . . . . . . . . . . . . . . . 446
8.6 Random Walk in One Space Dimension . . . . . . . . . . . . . . 450
8.7 Random Walk in Two Space Dimensions . . . . . . . . . . . . . 456
8.8 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 459
8.9 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 466
9 Object-Oriented Programming . . . . . . . . . . . . . . . . . . . . . . 483
9.1 Inheritance and Class Hierarchies . . . . . . . . . . . . . . . . . . . 483
9.2 Class Hierarchy for Numerical Differentiation . . . . . . . . . 492
9.3 Class Hierarchy for Numerical Integration . . . . . . . . . . . . 504
9.4 Class Hierarchy for Making Drawings . . . . . . . . . . . . . . . . 513
9.5 Classes for DNA Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . 534
9.6 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 541
References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 785
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 787

二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

关键词:Programming Scientific Program Edition Primer

已有 2 人评分经验 收起 理由
残阳_等待 + 100 精彩帖子
zl89 + 60 精彩帖子

总评分: 经验 + 160   查看全部评分

沙发
灰原哀-穷(真实交易用户) 发表于 2018-3-21 13:06:53 来自手机
alldoing1 发表于 2018-3-21 11:53
A primer on scientific programming with Python_Third Edition 2012
      The aim of this book is to  ...
楼主辛苦了,谢谢分享

藤椅
line_us(未真实交易用户) 发表于 2018-3-21 15:33:51
支持分享

板凳
军旗飞扬(未真实交易用户) 发表于 2018-3-21 22:25:05
谢谢分享

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注cda
拉您进交流群
GMT+8, 2025-12-31 18:35