Programming for Lovers in Python: Conditions and Loops

Pubblicato il: 01 gennaio 1970
sul canale di: Philomath
2,935
127

00:00 Welcome!
05:25 Branching and looping are critical to programming
07:30 Let's code! An introduction to if statements
15:59 Adding else if to handle more than two possibilities
24:07 Combining statements with and, or
34:23 A little math (oh no!) can make our function faster
40:59 Index of comparison operators
42:30 An intro to while loops with a factorial function
53:55 Handling factorial(0) and raising errors
1:01:48 An infinite loop
1:06:45 Summing the first n integers
1:14:07 Useful shorthand techniques for updating arithmetic variables
1:16:20 Gauss sees a faster approach
1:22:51 Introducing for loops
1:30:15 Use a for loop any time you can
1:33:00 Sometimes, you need to use a while loop (a.k.a. Pittsburgh January)
1:39:06 Variations on ranging in Python
1:54:50 Think less, make more money, and happy coding

This video is part of Programming for Lovers in Python and covers an introduction to conditionals, while loops, and for loops.

This code along accompanies Chapter 0 of Programming for Lovers on "Ancient Greek Math and the Foundations of Computer Science". It covers the material linked below:

[Conditionals] https://programmingforlovers.com/chap...

[While Loops] https://programmingforlovers.com/chap...

[For Loops] https://programmingforlovers.com/chap...

Programming for Lovers is an open online course where you write code to answer real scientific questions, built on award-winning teaching from Phillip Compeau, Professor at Carnegie Mellon University.

▶ Sign up for the mailing list to receive course materials, reminders, and earn a certificate:
http://eepurl.com/iC9DSg

▶ Free course materials and companion resources: https://programmingforlovers.com

▶ Practice problems and autograded exercises for this code-along:
https://cogniterra.org/course/63/promo

▶ Join the Philomath community on Discord:
  / discord  

⸻

Philomath Membership

All lectures and recordings are free and open.

If you’d like to participate more deeply—through office hours, bonus sessions, and community support—you can become a Philomath member here:

https://philomathlearning.com/?utm_so...

Membership supports the instructors and helps keep Philomath open.


In questa pagina del sito puoi guardare il video online Programming for Lovers in Python: Conditions and Loops della durata di ore minuti seconda in buona qualità , che l'utente ha caricato Philomath 01 gennaio 1970, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 2,935 volte e gli è piaciuto 127 spettatori. Buona visione!