Python Basics - Lesson 4 - FOR Loop, WHILE Loop and Conditional IF Statement

preview_player
Показать описание
Lesson 4 in Python Basics by Ziyan Junaideen covers LOOPs and IF statements. Loops and If statements are commonly used programming skills that is easy to learn.

In this video, initially we talk about WHILE LOOPS and FOR LOOPS in Python. WHILE LOOPs use a conditional statement to determine its boundaries while FOR LOOPs use an iterable data-structure like a List. When considering FOR LOOPS the range function ( range([start,] end [, increment]) ) comes handy as it generates an iterable list of values. When considering WHILE LOOPs, great care must be taken to guarantee the termination of the loop or would cause an infinite loop that could cause undesirable slowing down and effects.

Then this video discusses how to handle conditional statements using IF statement. IF statements structure is as follows:

if [condition] :
Line 1
Line 2
else:
Line 1
Line 2
Рекомендации по теме
Комментарии
Автор

thank you very much this vide it has helped so much, you are a true legend

alexyankson
Автор

Hi Bro...i like your teaching...no need to go class rooms, no need to waste money, ...Mr. Junaideen lecture is awesome...this is enough to get basic knowledge in PERL...and refer some Google data... Mr. Zjunaideen thanks a lot for uploading this video...I watch all your 8 Videos i cant say thanks for every video...but i like your dedication towards teaching... hope to see more lectures in future...may god bless u for this help ..

srinivas
Автор

Yes you can. Instead of a= yes, input a==("yes")

muhammadmustafa
Автор

@LEE15370 Its HD, you have to watch it full screen, its not bulky, go full screen.

ZJunaideen
Автор

How do i figure this out?
n = 1
while n < 6:
print("a", end=" ")
if n > 3:
print("b", end=" ")
n += 1

anthonypetersson
Автор

Can you help me out with the output for the below program..

group=[1., 2., 3., 4., 5.]
def test(group, counter=0):
for i in group:
counter +=i
return counter/len(group)
counter = 5
counter = test(group[1;-2])
print counter

ARIFHUSSAINSHAIKID
Автор

The screen is too small. Can you at least zoom-in so that we can see clearly.

LEE
Автор

3:00 did he say "sorry i just have

whystark
welcome to shbcf.ru