Learning Scientific Programming with Python最新文献

筛选
英文 中文
The Core Python Language I 核心Python语言1
Learning Scientific Programming with Python Pub Date : 2016-02-01 DOI: 10.1017/CBO9781139871754.002
Christian Hill
{"title":"The Core Python Language I","authors":"Christian Hill","doi":"10.1017/CBO9781139871754.002","DOIUrl":"https://doi.org/10.1017/CBO9781139871754.002","url":null,"abstract":"The Python shell This chapter introduces the syntax, structure and data types of the Python programming language. The first few sections do not involve writing much beyond a few statements of Python code and so can be followed using the Python shell . This is an interactive environment: the user enters Python statements that are executed immediately after the Enter key is pressed. The steps for accessing the “native” Python shell differ by operating system. To start it from the command line, first open a terminal using the instructions from Section 1.4 and type python. To exit the Python shell, type exit() . When you start the Python shell, you will be greeted by a message (which will vary depending on your operating system and precise Python version). On my system, the message reads: Python 3.3.5 |Anaconda 2.0.1 (x86_64)| (default, Mar 10 2014, 11:22:25) [GCC 4.0.1 (Apple Inc. build 5493)] on darwin Type “help”, “copyright”, “credits” or “license” for more information. >>> The three chevrons (>>>) are the prompt , which is where you will enter your Python commands. Note that this book is concerned with Python 3, so you should check that the Python version number reported on the first line is Python 3.X.Y where the precise values of the minor version numbers X and Y should not be important. Many Python distributions come with a slightly more advanced shell called IDLE, which features tab-completion, and syntax highlighting (Python keywords are colored specially when you type them). We will pass over the use of this application in favor of the newer and more advanced IPython environment, discussed in Chapter 5. It is also possible for many installations (especially on Windows) to start a Python shell directly from an application installed when you install the Python interpreter itself. Some installations even add a shortcut icon to your Desktop which will open a Python shell when you click on it. Numbers, variables, comparisons and logic Types of numbers Among the most basic Python objects are the numbers, which come in three types : integers (type: int), floating point numbers (type: float) and complex numbers (type: complex). Integers Integers are whole numbers such as 1, 8, −72 and 3847298893721407. In Python 3, there is no limit to their magnitude (apart from the availability of your computer's memory). Integer arithmetic is exact.","PeriodicalId":146668,"journal":{"name":"Learning Scientific Programming with Python","volume":"1 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2016-02-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"130357906","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
引用次数: 3
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
相关产品
×
本文献相关产品
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:604180095
Book学术官方微信