Introduction to Learning Python and Its Importance

 
C
S
T
 
1
1
0
1
P
r
o
b
l
e
m
 
S
o
l
v
i
n
g
 
U
s
i
n
g
 
C
o
m
p
u
t
e
r
s
 
1
 
 
CST 1101
 
Topic 02: “Hello World”
 
2
 
W
h
a
t
 
M
a
k
e
s
 
L
e
a
r
n
i
n
g
 
P
y
t
h
o
n
 
I
m
p
o
r
t
a
n
t
?
 
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
 
W
h
o
 
U
s
e
s
 
P
y
t
h
o
n
?
 
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
 
W
h
y
 
P
y
t
h
o
n
?
 
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
 
T
r
a
d
i
t
i
o
n
a
l
 
v
s
 
S
c
r
i
p
t
i
n
g
 
L
a
n
g
u
a
g
e
s
 
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
 
R
u
n
n
i
n
g
 
P
y
t
h
o
n
 
P
r
o
g
r
a
m
s
 
Hybrid compiled/interpreted architecture
We will use 
I
ntegrated 
D
evelopment 
L
earning 
E
nvironment (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
 
D
o
w
n
l
o
a
d
 
I
D
L
E
 
a
n
d
 
P
y
t
h
o
n
 
https://www.python.org/downloads/
 
8
 
I
D
L
E
 
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
 
I
D
L
E
 
S
h
e
l
l
 
10
 
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.
 
>>>help() command
starts interactive help
Ctrl-C command exits
interactive help
Interactive help for the
if
 operator
 
11
 
C
r
e
a
t
i
n
g
 
a
n
d
 
R
u
n
n
i
n
g
 
a
 
P
y
t
h
o
n
 
p
r
o
g
r
a
m
 
To create a new Python program, choose 
File 
 New File 
to open a text
editor window
 
 
 
 
 
 
A new window will be open
for editing
To save do 
File 
 Save as
To run do 
Run 
 Run module 
or click 
F5
 
12
 
S
a
v
i
n
g
 
f
i
l
e
 
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
 
C
o
m
m
e
n
t
s
 
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
 
C
o
m
m
e
n
t
s
 
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
 
U
s
i
n
g
 
P
y
t
h
o
n
 
S
h
e
l
l
 
a
s
 
a
 
C
a
l
c
u
l
a
t
o
r
 
16
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.

  • Python programming
  • Scripting language
  • Software development
  • IT industry
  • Web development

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

More Related Content

giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#giItT1WQy@!-/#