"break" & "continue" Statements in Python #10

"break" & "continue" Statements in Python #10

Programiz

3 года назад

98,276 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

Losika Nicholas
Losika Nicholas - 12.10.2023 14:45

Y r we using or during the comparison

Ответить
Muhammad Hamid
Muhammad Hamid - 20.08.2023 04:27

Thanks for teaching me, Sir. Your channel is incredible and fun to watch and learn.

Ответить
The Mystery World
The Mystery World - 02.08.2023 13:34

language = ['python','java','swift','c','c++']

new_language = [ ]
for i in language:
if i == "swift" or i == 'c++':
continue
else:
new_language.append(i)

new_language will be ['python', 'java', 'c']

Ответить
Lakshan J. Kumara
Lakshan J. Kumara - 21.05.2023 18:29

languages=("Python" , "java" , "Swift" ,"C","C++")
for language in languages:
if language=="Swift" or language=="C":
continue
print(language)

Ответить
Man0cash
Man0cash - 01.05.2023 02:57

thank you for this video it was helpful :)

Ответить
Girish GH
Girish GH - 28.03.2023 09:56

languages=["c++","c","phyton","swift","rust"]
for language in languages:
if language == "swift" or language == "c++":
continue
print(language)

Ответить
Vaishali Dixit
Vaishali Dixit - 12.03.2023 10:29

THANK YOU SIR
HERE IS THE CODING TASK
languages = ["PYTHON","JAVA","SWIFT","C","C++"]
for i in languages:

if i == "C++" or i == "SWIFT" :
continue

print (i)

Ответить
Anukaran
Anukaran - 30.12.2022 17:11

lang = ['python','java','swift','c','c++']
for i in lang:
if (i==lang[2]) or (i==lang[4]) :
continue
else:
print(i)

Ответить
Mark jairus
Mark jairus - 01.12.2022 09:50

languages=["python","java","swift","c","c++"]
print(languages[0,1,3])

Ответить
John Haythorpe
John Haythorpe - 19.11.2022 03:33

Hi, I am loving the course. But this lesson appears to be out of order when I use the playlist to access the programs, it is appearing before lesson 9, instead of after. I am taking notes and practicing every exercise you demonstrate and then I vary my code a bit to see that I understand what you have taught. Thank you for this great series

Ответить
Ivan Paul Mendoza
Ivan Paul Mendoza - 27.10.2022 07:08

where the fuck did the for and in range come from there is no tutorial for that in this series

Ответить
Charles Ikusan
Charles Ikusan - 12.10.2022 02:39

for languages in ['Python', 'Java', 'Swift', 'C', 'C++']:
if (languages == 'Swift'or languages == 'C++'):
continue
print(languages)

Ответить
didi O.
didi O. - 17.08.2022 21:24

languages = ['python','java','swift','c','c++']
for language in languages:
if language == 'swift' or language == 'c++':
continue
print(language)

Ответить
Footballeditz
Footballeditz - 10.08.2022 11:30

languages = ["Python","Java","Swift","C","C++"]

for i in languages:
if i == languages[2] or i == languages[4]:
continue
else:
print(i)

Ответить
Victory Coconut
Victory Coconut - 04.08.2022 18:51

Wait! I'm using your Learn Python app and it is really helpful!

Ответить
Demetre Panjakidze
Demetre Panjakidze - 29.07.2022 16:56

languages = ["Python", "Java", "Swift", "C", "C++"]
list=[]
for _ in range(len(languages)):
if languages[_] == "Python" or languages[_] == "Java" or languages[_] == "C":
list.append(languages[_])
print(list)

Ответить
Emran Dafadar
Emran Dafadar - 29.07.2022 09:25

I can't understand this one but how about this :- languages = ["python", "java"', " Swift", "C"', " C++"]
Print(languages [0])
Print(languages [1])
Print(languages [3])

Ответить