Logo

COMPSCI 119 - Shared screen with speaker view
Maria Pitel
07:11
Is the else indented?
Giovanni Quintal
07:23
no
Jean Saint-Felix
07:41
Multiple else statements?
Robby Gatzke
07:49
elif
Khoa Pham
09:22
do we use a different link for lecture everytime?
Khoa Pham
09:34
i mean zoom link
William Verts
09:35
yes
Robby Gatzke
14:32
no
Maria Pitel
14:32
no
Aiesha Ayub
14:34
No
Felipe Motta
14:34
yes
Emily Bevacqua
14:35
yes
Yikang Gong
14:35
no
Felipe Motta
14:36
yes
T.J. LaLonde
14:39
no
Giovanni Quintal
14:40
no
Reid Kankel
15:57
After the “else” is the “if” indented?
Addy
17:52
So is this a multilayered if/else statement?
Samuel Boswell
18:36
why nest an if and else within an else, if you could just use an if and else
Samuel Boswell
18:46
or two ifs, and one else
Conner McGarry
18:51
great question sam!
Samuel Boswell
19:14
wow, thank you very much, conner! I try.
Felipe Motta
20:15
How do you make it so that the program restarts automatically after it runs once?
Yikang Gong
20:45
click the file window
Andrew Kalemba
21:02
For this situation, could you use float rather than in
Andrew Kalemba
21:05
*int
Andrew Kalemba
21:23
thanks
Addy
23:24
can we use an elif statement here?
Giovanni Quintal
24:32
would we not use that ever
Giovanni Quintal
24:52
as in not efficient
Robby Gatzke
27:59
else
Jahnavi Mahadik
28:45
do you need a : for elif
Joseph McCaffery
28:54
do all the "print" statements need to be indented the same as each other?
Joseph McCaffery
29:00
or are those independent structures?
Robert
29:01
Is this the same efficiency as the previous one
Reid Kankel
29:07
Idk if u already mentioned, but do we need parenthesis ?
Felipe Motta
30:30
Why not use elif as well on the last line?
Samuel Boswell
30:57
because you don't have anything else to specify, so youre just saying everything else
Robby Gatzke
30:57
Else is everything left not listed above
Cheryl Amadi
31:15
what could possibly be in the first parenthesis?
Aiesha Ayub
31:53
how do you know to use elif after the first if statement? Do you have to do the first method?
Cheryl Amadi
32:25
I meant the input
Joseph McCaffery
32:40
input is a prompt that the user would read
Joseph McCaffery
32:46
so it could be "enter student grade"
Cheryl Amadi
32:53
yeah
Elizabeth Foley
32:57
I think you put whatever statement you want an answer to
Cheryl Amadi
33:31
yeah
Robby Gatzke
35:13
So n is just a holder value so you don’t type that entire thing
Samuel Boswell
35:46
it is the name of a variable, it could be anything you want it to be
Giovanni Quintal
35:47
its a variable that the user types in
Robby Gatzke
38:55
Mind blow
Robby Gatzke
38:59
Blown
Samuel Boswell
38:59
better than ever
Aiesha Ayub
38:59
^
Addy
39:59
So is the takeaway here is just to realise how we can use elif statements to reduce the clutter of an If/else statement
Joseph McCaffery
43:12
if you wanted to enter 80 student grades
Addy
43:26
can you show us an example of this in idle?
Addy
46:44
So is the payload here the while loop parameter>
Addy
46:47
?*
Robby Gatzke
47:29
You loop entire thing
Sean Morris
47:29
says all done 10 times
Alex Oliveira
47:31
now after each number it says "all done"
Joseph McCaffery
47:31
all done after every number
John Lauro
47:32
it would print all done after I
Maria Pitel
47:33
All done after each number
Arnav Mehra
48:19
is I = I +1 also a part of the payload?
Joseph McCaffery
49:09
yes, it is how the payload knows how to stop
Arnav Mehra
49:26
sounds good, thanks @joseph
Felipe Motta
54:46
Yes
Jean Saint-Felix
54:56
can u explain the math?\
Joseph McCaffery
55:27
if N=4, then 1 + 2 + 3 + 4 = 10.
Khoa Pham
55:34
could you unmute the mic? i have some question to ask
Caroline Sonnett
55:53
Thank you!