while loops | Intro to CS - Python | Khan Academy

  Рет қаралды 2,358

Khan Academy

Khan Academy

Күн бұрын

Пікірлер: 2
@KelsieJG__they-them
@KelsieJG__they-them 2 ай бұрын
A small change I would make is have your coin flip count start at 1, because it's only at 0 before you run the while loop. You can see it prints out that you've done 0 coin flips after your first coin flip, and ends at 4 flips when it's really been 5.
@khanacademy
@khanacademy 2 ай бұрын
It all depends on where you print the number of coin flips in the loop! If we moved the print statement until after the line `num_flips = num_flips + 1`, then we would see that the number of flips is 1 at the end of the first loop iteration.
Tracing loop execution | Intro to CS - Python | Khan Academy
4:56
Khan Academy
Рет қаралды 4,3 М.
Molecular polarity | Chemistry | Khan Academy
14:24
Khan Academy
Рет қаралды 3,8 М.
Bike Vs Tricycle Fast Challenge
00:43
Russo
Рет қаралды 100 МЛН
小天使和小丑太会演了!#小丑#天使#家庭#搞笑
00:25
家庭搞笑日记
Рет қаралды 17 МЛН
Help Me Celebrate! 😍🙏
00:35
Alan Chikin Chow
Рет қаралды 39 МЛН
Loops: Part 5
36:13
Stephanie Valentine
Рет қаралды 33
Absolute Value Functions (Transformations)
10:17
Joshua Payan
Рет қаралды 27
Sir Zia Repo Part 2 Practice step03_04 |Governor Sindh IT Course
47:58
Knowledge & Learning
Рет қаралды 4,3 М.
intro to python
26:29
anything and IT
Рет қаралды 86
Generics in C (Pool Allocator #2)
1:28:47
Raff K
Рет қаралды 1 М.
2 4 VENN DIAGRAMS   3 EXAMS
25:57
Charlene Tutors Math
Рет қаралды 81
Bike Vs Tricycle Fast Challenge
00:43
Russo
Рет қаралды 100 МЛН