O slideshow foi denunciado.
Seu SlideShare está sendo baixado. ×

Beginning Python Programming

Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Beginning
Programming
Agenda:
• Learn what Python is and what it is capable of doing.
• Install Python’s IDE for Windows and gain an appreciatio...

Vídeos do YouTube não são mais aceitos pelo SlideShare

Visualizar original no YouTube

Próximos SlideShares
Intro to Python
Intro to Python
Carregando em…3
×

Confira estes a seguir

1 de 35 Anúncio

Beginning Python Programming

Baixar para ler offline

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.

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.

Anúncio
Anúncio

Mais Conteúdo rRelacionado

Diapositivos para si (20)

Semelhante a Beginning Python Programming (20)

Anúncio

Mais de St. Petersburg College (20)

Mais recentes (20)

Anúncio

Beginning Python Programming

  1. 1. Beginning Programming
  2. 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. 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. 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. 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. 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.
  7. 7. Python helped build Quora too! Read more: https://goo.gl/nr8BZk
  8. 8. Raspberry Pi (Python) programming Blinking LED code at: http://goo.gl/O3yozd
  9. 9. https://www.python.org/downloads Installing Python https://docs.python.org/3.6/tutorial/index.html
  10. 10. IDLE - Integrated DeveLopment Environment) The third line is a print statement (function), which prints the stored name “Hello World.”
  11. 11. Calculations, variables, strings, and lists.
  12. 12. Review Calculations: 20 * 6.789 250 – 45 40 / 8.9 5 + 30 * 20 (5 + 30) * 20 ((5+30) * 20) / 10 Variables: chad = 100 sam = chad print(sam) myscore = 1000 message = 'I scored %s points' print(message % myscore) Lists: music_list = ['The Beatles', 'Led Zeppelin' , 'Pink Floyd' , 'Mr. Bungle'] print(music_list) print(music_list[3]) music_list.append('The Clash') >>> print(music_list)
  13. 13. Source: https://goo.gl/JS73o4
  14. 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. 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
  16. 16. If statements, functions, loops, modules.
  17. 17. Review Functions: range() list() Pen https://docs.pyt hon.org/3/librar y/functions.html Modules: turtle https://docs.pytho n.org/3/py- modindex.html If statements: If age > 20: == equal to != not equal to >= Greater than or equal to <= Less than or equal to Loops: for x in range(0,5): print(“Hello world”)
  18. 18. Creating Simple Programs
  19. 19. A place to “host and review code, manage projects, and build software alongside millions of other developers.” Explore …
  20. 20. Play Tic Tac Toe Against AI Code available at https://github.com/geekcomputers/Python
  21. 21. Flow Chart Image source: https://goo.gl/mo7NY
  22. 22. Creating Madlibs variable function string
  23. 23. Some great resources to help you learn to code
  24. 24. Read more at http://goo.gl/Hgy16A
  25. 25. .com Learn to code interactively, for free.
  26. 26. http://www.oeconsortium.org/
  27. 27. https://www.coursera.org/
  28. 28. https://www.codeavengers.com/
  29. 29. https://www.khanacademy.org
  30. 30. https://teamtreehouse.com/
  31. 31. https://www.codeschool.com/
  32. 32. http://coderdojo.com
  33. 33. http://www.slideshare.net/chadmairn @cmairn
  34. 34. Contact me!

×