introduction to python.ppt

20 185 0
introduction to python.ppt

Đ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

            !"#$  %&  '  '  (#  %    )**+&$  (  ,  -./  /,  01 [...]... you need to get started  Linux – it’s already there! Unless you’re running a very unusual distro (in which case you probably already know what you’re doing)  Mac – it’s already there on OS X, but it’s old Get a more up -to- date one [www.python.org]  The official python tutorial:  Software Carpentry:  Dive into Python:  Learn Python the Hard Way:  A Byte of Python: http://docs.python.org/tutorial/... things  If you want to do something that isn’t particularly uncommon, there will be a library to do it for you  No But python can wrap your existing C/Fortran/R code  You can get the benefits of a high-level language whilst keeping your fast C/Fortran routines  This is what Numpy does (and why Numpy is fast)  .and Matlab code translates pretty easily to python  A good language to teach  Questions... environment  I mostly write code in iPython interactively, then copy it out into a script when I’m done  print is easy and intuitive to use  Yes, you should use a proper debugger, but let’s face it – print statements are quicker and easier  Well, print statements in python are even quicker and easier than that  Readable code  You have to indent all of your loops, conditionals, etc  This means that your... Byte of Python: http://docs.python.org/tutorial/ http://software-carpentry.org/ http://www.diveintopython.net/ http://learnpythonthehardway.org/ http://www.ibiblio.org/g2swap/byteofpython/read/  Python Essential Reference David M Beazley (Addison Wesley)  Programming in Python 3: A Complete Introduction to the Python Language Mark Summerfield (Addison Wesley)  Learning Python Mark Lutz (O’Reilly Media)... Questions you won’t hear if you teach python: ▪ “What does ‘Segmentation fault’ mean?” ▪ “Why do I have to click ‘build’ before I run this every time?” ▪ “Do you know where I can download a license for this so I can use it at home?”  Questions you may still hear: ▪ “What’s a variable?” ▪ “Why do we have to do this?”  Let’s have a look at a few python libraries in action  Firstly, get version 2.7.x Python

Ngày đăng: 24/10/2014, 21:28

Từ khóa liên quan

Mục lục

  • Introduction to Python

  • What is Python?

  • Why is it well-suited to science?

  • Publication quality output...

  • What is Python not?

  • Who uses Python?

  • I’m bored now. Show me something cool that Python can do.

  • Why is Python better than what I use now?

  • Are you doing this?

  • You could be doing this!

  • Slide 11

  • Slide 12

  • Slide 13

  • Great. So are you volunteering to rewrite all my existing code?

  • Slide 15

  • More code!

  • How can I get Python?

  • How can I learn Python?

  • Some recommended books

  • The End

Tài liệu cùng người dùng

  • Đang cập nhật ...

Tài liệu liên quan