Introduction to Learning Python and Its Importance

Slide Note
Embed
Share

Python is a versatile and widely used scripting language known for its simplicity, readability, and flexibility, making it ideal for various applications. It is favored by professionals in IT, engineering, and other industries, with major organizations like Google and NASA utilizing it for tasks ranging from web development to AI implementation. Learning Python is valuable for rapid application development, system integration, and more, offering a free interpreter and extensive libraries across different platforms.


Uploaded on Sep 27, 2024 | 0 Views


Download Presentation

Please find below an Image/Link to download the presentation.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. Download presentation by click this link. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.

E N D

Presentation Transcript


  1. CST 1101 CST 1101 Problem Solving Using Computers Problem Solving Using Computers 1

  2. CST 1101 Topic 02: Hello World 2

  3. What Makes Learning Python Important? What Makes Learning Python Important? Python lets you work quickly to integrate systems as a scripting or glue language. It s also suited for Rapid Application Develop (RAD). The game Civilization 4 has all its inner logic, including AI, implemented in Python. NASA uses Python in its Integrated Planning System as a standard scripting language. Features: Simple to learn and easily read Associated web frameworks for developing web-based applications Free interpreter and standard library available in source or binary on major platforms 3

  4. Who Uses Python? Who Uses Python? Professions and Industries: Python developers, software engineers, back end developers, Python programmers Used by employers in information technology, engineering, professional services and design Major Organizations: Google, Pinterest, Instagram, YouTube, DropBox, NASA, ESRI Specializations and Industries: Web and Internet development (frameworks, micro-frameworks and advanced content management systems); scientific and numeric computing; desktop graphical user interfaces (GUIs) 4

  5. Why Python? Why Python? Python is a scripting language : Free Portable dynamically-typed object-oriented Python Combines software engineering features of traditional systems languages with power and flexibility of scripting languages. 5

  6. Traditional vs Scripting Languages Traditional vs Scripting Languages Traditional languages (C++, Java) evolved for large-scale programming Emphasis on structure and discipline Simple problems != simple programs Scripting languages (Perl, Python, TCL) designed for simplicity and flexibility. Simple problems = simple, elegant solutions More amenable to experimentation and incremental development Python: Ideal first language, useful throughout curriculum (Information and Data Management, Data Mining) 6

  7. Running Python Programs Running Python Programs Hybrid compiled/interpreted architecture We will use Integrated Development Learning Environment (IDLE), an integrated development environment for Python and Python 3.6 Options: Start Interpreter from command line (>>> ) Type program statements Import script file Directly from IDLE 7

  8. Download IDLE and Python Download IDLE and Python https://www.python.org/downloads/ 8

  9. IDLE IDLE A quick way to launch IDLE is from Window s Start Menu choose IDLE (Python GUI) If you use Windows 10, see the example For Windows 7 or Vista see the example in the HowToStartIDLE.pdf tutorial 9

  10. IDLE Shell IDLE Shell Put the statement that you want to be displayed on the screen in double quotes. This is a String type that we will discuss later. 10

  11. >>>help() command starts interactive help Ctrl-C command exits interactive help Interactive help for the if operator 11

  12. Creating and Running a Python program Creating and Running a Python program To create a new Python program, choose File editor window New File to open a text A new window will be open for editing To save do File To run do Run Save as Run module or click F5 12

  13. Saving file Saving file If the file that you try to run does not have all the recent updates you will see the following window. Click OK, follow the prompt and save your work 13

  14. Comments Comments Comments improve code readability and documentation Comments are not executed by a computer (a compiler skips them): Comments are for programmers and users Comments are not for computers 14

  15. Comments Comments Start comments with # the rest of line is ignored. Can include a documentation string as the first line of any new function or class that you define. The development environment, debugger, and other tools use it: it s good style to document your code with comments. 15

  16. Using Python Shell as a Calculator Using Python Shell as a Calculator 16

Related