1. Trang chủ
  2. » Công Nghệ Thông Tin

python for informatics exploring data

228 197 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 228
Dung lượng 1,53 MB

Nội dung

This book is designed to introduce students to programming and computational thinking through the lens of exploring data. You can think of Python as your tool to solve problems that are far beyond the capability of a spreadsheet. It is an easy-to-use and easy-to learn programming language that is freely available on Windows, Macintosh, and Linux computers. There are free downloadable copies of this book in various electronic formats and a self-paced free online course where you can explore the course materials. All the supporting materials for the book are available under open and remixable licenses. This book is designed to teach people to program even if they have no prior experience.

[...]... UNIX or Windows command window, you would type python dinsdale.py In other development environments, the details of executing scripts are different You can find instructions for your environment at the Python Website python. org Working in interactive mode is convenient for testing small pieces of code because you can type and execute them immediately But for anything more than a few lines, you should... language: input: Get data from the keyboard, a file, or some other device, pausing if necessary output: Display data on the screen or send data to a file or other device sequential execution: Perform statements one after another in the order they are encountered in the script conditional execution: Check for certain conditions and execute or skip a sequence of statements repeated execution: Perform some set... applications For example, the notation that mathematicians use is a formal language that is particularly good at denoting relationships among numbers and symbols Chemists use a formal language to represent the chemical structure of molecules And most importantly: Programming languages are formal languages that have been designed to express computations Formal languages tend to have strict rules about syntax For. .. This page contains information about Python and links to Python- related pages, and it gives you the ability to search the Python documentation For example, if you enter print in the search window, the first link that appears is the documentation of the print statement At this point, not all of it will make sense to you, but it is good to know where it is Exercise 1.3 Start the Python interpreter and... help('print') to get information about the print statement If this example doesn’t work, you may need to install additional Python documentation or set an environment variable; the details depend on your operating system and version of Python 14 Chapter 1 Why should you learn to write programs? Exercise 1.4 Start the Python interpreter and use it as a calculator Python s syntax for math operations is... point, programming becomes a very pleasant and creative process We start with the vocabulary and structure of Python programs Be patient as the simple examples remind you of when you started reading for the first time 1.4 The Python programming language The programming language you will learn is Python Python is an example of a highlevel language; other high-level languages you might have heard of are C,... probably no penny and nothing dropping1 Formal languages mean exactly what they say People who grow up speaking a natural language—everyone—often have a hard time adjusting to formal languages In some ways, the difference between formal and natural language is like the difference between poetry and prose, but more so: Poetry: Words are used for their sounds as well as for their meaning, and the whole poem... processor” main memory: Stores programs and data Main memory loses its information when the power is turned off secondary memory: Stores programs and data and retains its information even when the power is turned off Generally slower than main memory Examples of secondary memory include disk drives and flash member in USB sticks problem solving: The process of formulating a problem, finding a solution,... 150 13.6 Handling XML data from an API 152 13.7 Glossary 153 13.8 Exercises 154 14 Using databases and Structured Query Language (SQL) 155 14.1 What is a database? 155 14.2 Database concepts 155 14.3 SQLite Database Browser ... PDA For now, our primary motivation is not to make money or please end-users, but instead for us to be more productive in handling the data and information that we will encounter in our lives When you first start, you will be both the programmer and end-user of your programs As you gain skill as a programmer and programming feels more creative to you, your thoughts may turn toward developing programs for

Ngày đăng: 13/06/2014, 16:19