Download free for 30 days
Sign in
Upload
Language (EN)
Support
Business
Mobile
Social Media
Marketing
Technology
Art & Photos
Career
Design
Education
Presentations & Public Speaking
Government & Nonprofit
Healthcare
Internet
Law
Leadership & Management
Automotive
Engineering
Software
Recruiting & HR
Retail
Sales
Services
Science
Small Business & Entrepreneurship
Food
Environment
Economy & Finance
Data & Analytics
Investor Relations
Sports
Spiritual
News & Politics
Travel
Self Improvement
Real Estate
Entertainment & Humor
Health & Medicine
Devices & Hardware
Lifestyle
Change Language
Language
English
Español
Português
Français
Deutsche
Cancel
Save
Submit search
EN
Uploaded by
KamilKlaime1
PDF, PPTX
4 views
Lecture 1-Intro to programming and python.pdf
this presentation is an introduction for python programming
Engineering
◦
Read more
0
Save
Share
Embed
Embed presentation
Download
Download as PDF, PPTX
1
/ 36
2
/ 36
3
/ 36
4
/ 36
5
/ 36
6
/ 36
7
/ 36
8
/ 36
9
/ 36
10
/ 36
11
/ 36
12
/ 36
13
/ 36
14
/ 36
15
/ 36
16
/ 36
17
/ 36
18
/ 36
19
/ 36
20
/ 36
21
/ 36
22
/ 36
23
/ 36
24
/ 36
25
/ 36
26
/ 36
27
/ 36
28
/ 36
29
/ 36
30
/ 36
31
/ 36
32
/ 36
33
/ 36
34
/ 36
35
/ 36
36
/ 36
More Related Content
PPT
Introduction to python
by
Ranjith kumar
PDF
Python Module-1.1.pdf
by
4HG19EC010HARSHITHAH
PDF
CPPDS Slide.pdf
by
Fadlie Ahdon
PDF
Class_X_PYTHON_J.pdf
by
SanjeedaPraween
PPTX
MODULE 1.pptx
by
KPDDRAVIDIAN
PPTX
#Code2Create: Python Basics
by
GDGKuwaitGoogleDevel
DOCX
A Introduction Book of python For Beginners.docx
by
kumarrabinderkumar77
PPT
Help with Pyhon Programming Homework
by
Helpmeinhomework
Introduction to python
by
Ranjith kumar
Python Module-1.1.pdf
by
4HG19EC010HARSHITHAH
CPPDS Slide.pdf
by
Fadlie Ahdon
Class_X_PYTHON_J.pdf
by
SanjeedaPraween
MODULE 1.pptx
by
KPDDRAVIDIAN
#Code2Create: Python Basics
by
GDGKuwaitGoogleDevel
A Introduction Book of python For Beginners.docx
by
kumarrabinderkumar77
Help with Pyhon Programming Homework
by
Helpmeinhomework
Similar to Lecture 1-Intro to programming and python.pdf
PDF
Introduction to Python and its basics.pdf
by
sumitt6_25730773
PPT
Python - Module 1.ppt
by
jaba kumar
PDF
Python notes-part 1.pdf /BY ACNUUYHHSJNH
by
yadavsoniyy07
PPTX
Exploring Data Science Using Python Tools
by
mohankamalhbec24
PDF
Python for Physical Science.pdf
by
MarilouANDERSON
PPT
Spsl iv unit final
by
Sasidhar Kothuru
PPT
Spsl iv unit final
by
Sasidhar Kothuru
PPTX
Python-Certification-Training-Day-1-2.pptx
by
muzammildev46gmailco
PDF
python 34💭.pdf
by
AkashdeepBhattacharj1
PDF
pythonQuick.pdf
by
PhanMinhLinhAnxM0190
PDF
python notes.pdf
by
RohitSindhu10
PPTX
UNIT-1 : 20ACS04 – PROBLEM SOLVING AND PROGRAMMING USING PYTHON
by
Nandakumar P
PPTX
Unit -1 CAP.pptx
by
malekaanjum1
PPT
UNIT 1 PY .ppt - PYTHON PROGRAMMING BASICS
by
drkangurajuphd
PPTX
unit (1)INTRODUCTION TO PYTHON course.pptx
by
usvirat1805
PPTX
Introduction to Python Programming .pptx
by
NaynaSagarDahatonde
PPTX
PYTHON_VARIABLES_AND_OPERATORS(2022) CSD.pptx
by
Jeya Gowri
PPT
Unit - 1.ppt
by
Kongunadu College of Engineering and Technology
PPTX
Lecture1.pptx
by
akabiradam13
PDF
introduction to python programming course
by
FarhadMohammadRezaHa
Introduction to Python and its basics.pdf
by
sumitt6_25730773
Python - Module 1.ppt
by
jaba kumar
Python notes-part 1.pdf /BY ACNUUYHHSJNH
by
yadavsoniyy07
Exploring Data Science Using Python Tools
by
mohankamalhbec24
Python for Physical Science.pdf
by
MarilouANDERSON
Spsl iv unit final
by
Sasidhar Kothuru
Spsl iv unit final
by
Sasidhar Kothuru
Python-Certification-Training-Day-1-2.pptx
by
muzammildev46gmailco
python 34💭.pdf
by
AkashdeepBhattacharj1
pythonQuick.pdf
by
PhanMinhLinhAnxM0190
python notes.pdf
by
RohitSindhu10
UNIT-1 : 20ACS04 – PROBLEM SOLVING AND PROGRAMMING USING PYTHON
by
Nandakumar P
Unit -1 CAP.pptx
by
malekaanjum1
UNIT 1 PY .ppt - PYTHON PROGRAMMING BASICS
by
drkangurajuphd
unit (1)INTRODUCTION TO PYTHON course.pptx
by
usvirat1805
Introduction to Python Programming .pptx
by
NaynaSagarDahatonde
PYTHON_VARIABLES_AND_OPERATORS(2022) CSD.pptx
by
Jeya Gowri
Unit - 1.ppt
by
Kongunadu College of Engineering and Technology
Lecture1.pptx
by
akabiradam13
introduction to python programming course
by
FarhadMohammadRezaHa
Recently uploaded
PPTX
Unit 1 Introduction to Information Technology in Business.pptx
by
goitranjan001
PPT
new Introduction to PACS.ppt Picture Archieving and communication and medicine
by
ssuserf3d7af
PPTX
Plant Performance Strategies: Enhanced Reliability & Operational Efficiency w...
by
MaintWiz Technologies Private Limited
PDF
Lecture -06-Hybrid Policies - Chapter 7- Weeks 6-7.pdf
by
salaarmike
PPTX
Track & Monitor Preventive Maintenance — Best Practices with MaintWiz CMMS
by
MaintWiz Technologies Private Limited
PPTX
firewall Selection in production life pptx
by
ssuserb1479b
PPTX
MECCA Empire – Hotel Shuttle System for the 2026 FIFA World Cup
by
ay2432
PDF
CV_Rahul_ELV Project Engineer_8 Years Experience
by
RahulSushruth
PPT
63490613-Boiler-Tube-Leakage-analysis-symptoms-causes.ppt
by
allahdittashafi
PPTX
IEC60079-10-1 -Annex F -Hazardous Area Classification -HAC-Annex F.pptx
by
asifmirzamakki
PPTX
Assessment 4 SRS Presentation - Final (2).pptx
by
ayush445302
PPTX
علي نفط.pptx هندسة النفط هندسة النفط والغاز
by
engpe23e27
PPTX
ISO 14224 Compliance & CMMS Software — A Comprehensive Guide for Reliable Mai...
by
MaintWiz Technologies Private Limited
PPTX
How to Use Mobile CMMS to Improve Maintenance Operations & Field Productivity
by
MaintWiz Technologies Private Limited
PDF
IPEC Presentation - Partial discharge Pro .pdf
by
waely1983
PDF
Surveillance_Partner_Product_Training_20240120_KSA.pdf
by
HamadaZayed1
PPTX
Power point presentation on introduction of software engineering
by
s6050748
PPTX
How to Select the Right CMMS Software for Your Organization — A Complete Buye...
by
MaintWiz Technologies Private Limited
PPTX
Step-by-step guide to designing standard a microbiology laboratory in pharmac...
by
shawkyabdo1
PDF
Advanced Intrusion Detection and Classification using Transfer Learning with ...
by
IJCNCJournal
Unit 1 Introduction to Information Technology in Business.pptx
by
goitranjan001
new Introduction to PACS.ppt Picture Archieving and communication and medicine
by
ssuserf3d7af
Plant Performance Strategies: Enhanced Reliability & Operational Efficiency w...
by
MaintWiz Technologies Private Limited
Lecture -06-Hybrid Policies - Chapter 7- Weeks 6-7.pdf
by
salaarmike
Track & Monitor Preventive Maintenance — Best Practices with MaintWiz CMMS
by
MaintWiz Technologies Private Limited
firewall Selection in production life pptx
by
ssuserb1479b
MECCA Empire – Hotel Shuttle System for the 2026 FIFA World Cup
by
ay2432
CV_Rahul_ELV Project Engineer_8 Years Experience
by
RahulSushruth
63490613-Boiler-Tube-Leakage-analysis-symptoms-causes.ppt
by
allahdittashafi
IEC60079-10-1 -Annex F -Hazardous Area Classification -HAC-Annex F.pptx
by
asifmirzamakki
Assessment 4 SRS Presentation - Final (2).pptx
by
ayush445302
علي نفط.pptx هندسة النفط هندسة النفط والغاز
by
engpe23e27
ISO 14224 Compliance & CMMS Software — A Comprehensive Guide for Reliable Mai...
by
MaintWiz Technologies Private Limited
How to Use Mobile CMMS to Improve Maintenance Operations & Field Productivity
by
MaintWiz Technologies Private Limited
IPEC Presentation - Partial discharge Pro .pdf
by
waely1983
Surveillance_Partner_Product_Training_20240120_KSA.pdf
by
HamadaZayed1
Power point presentation on introduction of software engineering
by
s6050748
How to Select the Right CMMS Software for Your Organization — A Complete Buye...
by
MaintWiz Technologies Private Limited
Step-by-step guide to designing standard a microbiology laboratory in pharmac...
by
shawkyabdo1
Advanced Intrusion Detection and Classification using Transfer Learning with ...
by
IJCNCJournal
Lecture 1-Intro to programming and python.pdf
1.
March, 2023 –
AUT www.aut.edu Programming Python
2.
2 © AUT –
www.aut.edu Python and Game design Workshop Dr. Kamil KLAIME
3.
3 © AUT –
www.aut.edu The workshop will cover the following topics during 4 sessions: 1. Programming Concept (session 1) 2. Programming Languages-Python (session 1) 3. Numbers and variables in python (session 1) 4. Conditions and loops (session 2) 5. Games design under python using Pygame library (session 3) 6. Introduction to Unity 3D (session 4) Content
4.
4 © AUT –
www.aut.edu FROM OEA to AUT-North
5.
5 © AUT –
www.aut.edu What Is a Program? Usually, one or more algorithms written in a programming language that can be translated to run on a real machine We sometimes call programs software
6.
6 © AUT –
www.aut.edu What Is a Programming Language? A programming language is somewhat like a natural language, but with a very limited set of statements and strict syntax rules. Has statements to implement sequential, conditional and iterative processing - algorithms Examples: FORTRAN, COBOL, Lisp, Basic, Pascal, C, C++, Java, C#, Python, …
7.
7 © AUT –
www.aut.edu Compiler A compiler is a program that converts a program written in a programming language into a program in the native language, called machine language, of the machine that is to execute the program.
8.
8 © AUT –
www.aut.edu From Algorithms to Hardware (with compiler) Algorithm Program A real computer Translate (by a human being) Translate (by compiler program)
9.
9 © AUT –
www.aut.edu The Program Development Process (Control Flow) Edit Compile Run Syntax errors Input Output Runtime errors
10.
10 © AUT –
www.aut.edu Three kinds of errors Syntax error : Some statement in the program is not a legal statement in the language. Runtime error : An error occurs while the program is executing, causing the program to terminate (divide by zero, etc.) Logic error : The program executes to completion, but gives incorrect results.
11.
11 © AUT –
www.aut.edu Interpreter An alternative to a compiler is a program called an interpreter. Rather than convert our program to the language of the computer, the interpreter takes our program one statement at a time and executes a corresponding set of machine instructions.
12.
12 © AUT –
www.aut.edu Interpreter Edit Interpreter Syntax or runtime errors Input Output
13.
13 © AUT –
www.aut.edu Python Python is a real-world, production language that is freely available for most computers. http:www.python.org you can run and execute python online or on your machine using many platform, ex : Thonny
14.
14 © AUT –
www.aut.edu Python online https://pynative.com/online-python-code-editor-to-execute-python-code/
15.
15 © AUT –
www.aut.edu Network :: OEA-Tripoli Password ::OEA@06961 WIFI
16.
16 © AUT –
www.aut.edu Python Python uses an interpreter. Not only can we write complete programs, we can work with the interpreter in a statement by statement mode enabling us to experiment quite easily.
17.
17 © AUT –
www.aut.edu Language terminology Syntax: The formal rules for legal statements in the language. Semantics: The meaning of the statements - what happens when the statement is executed.
18.
18 © AUT –
www.aut.edu Three major control constructs of programming (Execution flow of instructions) Sequential: Simply do steps one after the other in order they are listed. Conditional: Decide which statement to do next based on some true/false test. Iterative: A set of statements is repeated over and over until some condition is met.
19.
19 © AUT –
www.aut.edu Sequential Operations “Atomic” Input Computation Output
20.
20 © AUT –
www.aut.edu The Basic Pattern Most of our programs will use the basic pattern of Get some user input Perform some algorithm on the input Provide results as output
21.
21 © AUT –
www.aut.edu Identifiers Identifiers are names of various program elements in the code that uniquely identify the elements. They are the names of things like variables or functions to be performed. They're specified by the programmer and should have names that indicate their purpose. In Python, identifiers Are made of letters, digits and underscores Must begin with a letter or an underscore Examples: temperature, myPayrate, score2
22.
22 © AUT –
www.aut.edu Keywords Keywords are reserved words that have special meaning in the Python language. Because they are reserved, they can not be used as identifiers. Examples of keywords are if, while, class, import.
23.
23 © AUT –
www.aut.edu Variables in Python A variable has A name – identifier A data type - int, float, str, etc. Storage space sufficient for the type.
24.
24 © AUT –
www.aut.edu Numeric Data Types int This type is for whole numbers, positive or negative. Examples: 23, -1756 float This type is for numbers with possible fraction parts. Examples: 23.0, -14.561
25.
25 © AUT –
www.aut.edu Integer operators The operations for integers are: + for addition - for subtraction * for multiplication / for integer division: The result of 14/5 is 2 % for remainder: The result of 14 % 5 is 4 *, /, % take precedence over +, - x + y * z will do y*z first Use parentheses to dictate order you want. (x+y) * z will do x+y first.
26.
26 © AUT –
www.aut.edu Integer Expressions Integer expressions are formed using Integer Constants Integer Variables Integer Operators Parentheses
27.
27 © AUT –
www.aut.edu Python Assignment Statements In Python, = is called the assignment operator and an assignment statement has the form <variable> = <expression> Here <variable> would be replaced by an actual variable <expression> would be replaced by an expression Python: age = 19
28.
28 © AUT –
www.aut.edu Python Assignment Statement Syntax: <variable> = <expression> Note that variable is on left Semantics: Compute value of expression Store this as new value of the variable Example: Pay = PayRate * Hours Payrate 10 Hours 40 Pay 400
29.
29 © AUT –
www.aut.edu Python Session
30.
30 © AUT –
www.aut.edu Python Session
31.
31 © AUT –
www.aut.edu What about floats? When computing with floats, / will indicate regular division with fractional results. Constants will have a decimal point. 14.0/5.0 will give 2.8 while 14/5 gives 2.
32.
32 © AUT –
www.aut.edu Comments Often we want to put some documentation in our program. These are comments for explanation, but not executed by the computer. If we have # anywhere on a line, everything following this on the line is a comment – ignored
33.
33 © AUT –
www.aut.edu Numerical Input To get numerical input from the user, we use an assignment statement of the form <variable> = input(<prompt>) Here <prompt> would be replaced by a prompt for the user inside quotation marks If there is no prompt, the parentheses are still needed Semantics The prompt will be displayed User enters number Value entered is stored as the value of the variable
34.
34 © AUT –
www.aut.edu Print Statement For output we use statements of the form print <expression> Semantics Value of expression is computed This value is displayed Several expressions can be printed – separate them by commas
35.
35 © AUT –
www.aut.edu Example - Fahrenheit to Centigrade We want to convert a Fahrenheit temperature to Centigrade. The formula is C = (F -32) x 5/9 We use type float for the temperatures.
36.
36 © AUT –
www.aut.edu Python Session
Download