Python is a widely-used and powerful computer programming language that has helped system administrators manage computer networks and problem solve computer systems for decades. Python has also built some popular applications like BitTorrent, Blender, Calibre, Dropbox, and much more. Going further, the “Pi” in Raspberry Pi stands for Python, so learning Python will instill more confidence when working with Raspberry Pi projects. Python is usually the first programming language people learn primarily because it is easy to learn and provides a solid foundation to learn other computer programming languages. In this webinar,
• Learn what Python is and what it is capable of doing.
• Install Python’s IDE for Windows and work in the Python shell.
• Use calculations, variables, strings, lists, and if statements.
• Discover Python’s built-in functions and understand modules.
• Create simple programs to build on later.
The recording is available at https://youtu.be/ThcWmJFf-ho.
2. Agenda:
• Learn what Python is and what it is capable of doing.
• Install Python’s IDE for Windows and gain an appreciation of the Python shell.
• Use calculations, variables, strings, lists, if statements, and more.
• Discover Python’s built-in functions and understand modules.
• Create simple programs to build on later.
3. What is computer programming?
• A set of commands a computer understands – like a recipe.
• Computer programs can help cure diseases; drive cars; create video
games; make animated movies/graphics; build websites and apps; and
much more.
• Basic coding concepts are used by most every program and most every
programmer.
• To learn more visit https://goo.gl/LYxa7V.
4. What is a programming language?
• A programming language is a set of rules that provides a way of telling
a computer:
• What operations to perform
• Communicating an algorithm
• Receives an input from the user and generates an output.
• A programming language is a system for describing a computation
(math) or algorithms (logic) in a machine-readable and human-
readable form.
• Has words, symbols, and grammatical rules (natural language)
• Grammatical rules = syntax
• Each language has a different set of syntax rules
• Has semantics (meaning)
Slide courtesy of Brian Pichman
5. Why learn to code?
• Why not?
• Learn the importance of clarity/brevity of expression.
• Be able to think and problem solve more accurately.
• Have a better understanding of how technology works.
• Create a tool that can make life easier and/or fun.
6. What is Python and what can it do?
• Python was named after Monty Python’s Flying Circus TV show.
• Python is an interpreted high-level programming language for general-
purpose programming.
• Interpreted means that the interpreter (embedded in Idle) can execute
instructions directly without compiling.
• Compiling is a translation from source code to a lower-level language (e.g.,
machine code)
• High-level programming resembles human languages, not machine languages, and
are easier to read and write.
• Python has helped build some famous applications like YouTube,
DropBox, Instagram, BitTorrent, Spotify, Reddit etc.
14. myfunc is the name of the function.
myname is the parameter (i.e., a variable
while the function is being used).
‘Chad’ is a string.
This function is defined by the def statement.
15. Functions
• A function is a piece of code that tells Python to do something. It is a type
of procedure or routine and usually returns a value. Functions are used to
utilize code in more than one place in a program.
• A procedure preforms an operation, but typically doesn’t provide a value.
• Most languages have pre-built or pre-defined functions in its library.
• For instance, the “delete” function means to “remove”. You don’t have to code what
“remove” does; only what to remove.
Defining a function in Python