To be Honest i was very very scared of programming, i am watching your Videos since last week and now i am writing few lines of codes just because of you. Thank you so much Your are diong a good job
I've been treing this code for several times, it doesn't skip the languages 2 and 4. I've tried other examples with "break" and "continue", and it worked. Am I doing something wrong?
languages = 'Python', 'Java', 'Swift', 'C', 'C++' for language in languages: if language == 'Swift': continue elif language == 'C++': continue print(language)
#lol, we think almost the same: languages=("Python","Java","Swift","C","C++") for language in languages: if language=="Swift" or language=="C++": continue print(language)
Great tutori, very professional and easy to follow. The only problem I have is ....I do not know where to find this "link below" where I can check the solution to exercizes at the end of each tutorial.
But bro have a doubt that should i watch your video or study from the website and i think video is best because my brother is learning from the website and it take a lot of times but in video you explain soo nicely and fast
Learning Python is something you would like to get in your skills, but you do not know where to start? This NEW channel will help you out leaning Python Programming from scratch - for complete Beginners, Intermediate and Advanced Levels
languages = ["Python", "Java", "Swift", "C", "C++"] result =[] for language in languages: if language in ["Swift"]: continue if language in ["C++"]: break result.append(language) print(f"The Output is {result}")
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
Thanks for clearing my confusion, it was really helpful but take care of your head don't move it so much it might "Break" and you may not be able to "Continue" with such series.
Dude you are an excellent teacher...am now enjoying coding languages=['python','java','swift','c','c++'] for language in languages: languages=['python','java','swift','c','c++'] if language==('swift'): continue if language==('c++'): break print(language)
I am new in programing . After several attempts, I found out the answer on the Github repository is wrong. Correct code should be list = ["Python", "Java", "Swift", "C", "C++"] for item in list: if item == "Swift" or item =="C++" continue print(item)
languages =["Python", "Java", "C", "Swift", "C++"] for character in languages: if character == "Swift" or character =="C++": break print(character) Or...... languages =["Python", "Java", "C", "Swift", "C++"] for character in languages: if character == "Swift" or character =="C++": continue print(character)
I do not recommend the first solution, it will work in this case because Swift and C++ are the last values in the list, but if one of them was the first item on the list then the loop would break and none of the languages would be printed.
Float means decimal numbers like 10.6, 9.0, 4.89, etc. If you try "int" instead of "float" it will only give you integer values like 10, 9, 4 and not the decimal values.
languages = ["Python", "Java", "Swift", "C", "C++"] for item in languages: if item=="Swift" or item=="C++": continue print(item) Programming is also about optimizing the code. I see a lot of people in the comment just making the program complex unnecessarily.
The logic you are trying to use is correct> However, there is an error in the test condition. Change the test condition to: item == "Swift" or item == "C++"
#Can you create a program so that all items of the language are printed except swift and C++ # language=["Python","Java","Swift", "c","c++"] language=["Python","Java","Swift","C","C++"] for i in language: if i=="Swift": continue elif i=="C++": continue else: print(i)
languages = [ " python" , " java" , " swift", " c" , " c++"] for language in langyages : print ( language) if language =" swift" or language = " c++" break
I forgot about OR, so my code is: languages = [ ] for language in languages: if language == 'swift': continue if language =='C++': break print(language)
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])
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)
#Question_answer language = ["Python", "Java", "Swift", "C", "C++"] for p_language in language: if p_language == "Swift": continue if p_language == "C++": continue print(p_language)
languages = ["Python", "Java", "Swift", "C", "C++"] without break&continue: for i in languages: if i != "Swift" and i !="C++": print(i) with break&continue: for i in languages: if i == "Swift": continue if i == "C++": continue print(i)
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']
🔥 Learn Python with a more hands-on experience with Programiz PRO-interactive lessons, quizzes & challenges.
Try Programiz PRO: bit.ly/right-python
Loving this series, I have learned a lot in such a short amount of time :D keep it up!
To be Honest i was very very scared of programming, i am watching your Videos since last week and now i am writing few lines of codes just because of you.
Thank you so much
Your are diong a good job
The best Channel to learn python
just one word- Awesome! Your channel is a very big help to me. Thanks :)
Everything is perfect, just keep your head stable when you speak. Thank you.
languages=["python","java","swift","c","c++"]
for i in range (len(languages)):
if(i==2 or i==4):
continue
print(languages[i])
I've been treing this code for several times, it doesn't skip the languages 2 and 4. I've tried other examples with "break" and "continue", and it worked. Am I doing something wrong?
@@irynahryma2605
a=["Python", "Java", "Swift", "C", "C++"]
for i in a:
if i.upper()=="SWIFT" or i.upper()=="C++":
continue
print(i)
languages=["phyton","java","swift","C","C++"]
for character in languages:
if character=="C++" or character=="swift":
continue
print(character)
thank you sir I was able to complete your home work.
why can't we just use an if statement instead of a while loop at 3:34?
languages = 'Python', 'Java', 'Swift', 'C', 'C++'
for language in languages:
if language == 'Swift':
continue
elif language == 'C++':
continue
print(language)
#lol, we think almost the same:
languages=("Python","Java","Swift","C","C++")
for language in languages:
if language=="Swift" or language=="C++":
continue
print(language)
for i in range(10):
language = str(input("Enter a language: "))
if language == "Swift" or language == "c++":
continue
print(language)
Thumbnail: Feeling cute, might teach python later :D
I don't understand your comment.. how you feel the cute? Teaching Python later to whom?
😂
@@RedBull.RedBull didn't understand the assignment.
🤣🤣🤣 nailed it!
I have written the same code just changed the variable " item" into "digits" at 2:36 but I am getting
languages = [ "Python" , "Java" , "Swift" , "C" , "C++"]
for a in languages:
if a == "Swift":
continue
if a == "C++":
continue
print(a)
Are bhai output nahi aa raha
@@kishansindhi5181 really? What's ur error? I'll see if I can help..
can you do it by input function. plz!
input the language by the user
If I type-
"if item == 3:
break"
after "print(item)" it gives Indentation error. Does anybody know why this happens.
If it says indentation error then you probably messed up somewhere on the indentations
Love your videos..and website...thanks so much for all that you and your team do...
Great tutori, very professional and easy to follow. The only problem I have is ....I do not know where to find this "link below" where I can check the solution to exercizes at the end of each tutorial.
Hi Nick,
You can find solutions to the exercise tasks in this link: github.com/programiz/python-course/
But bro have a doubt that should i watch your video or study from the website and i think video is best because my brother is learning from the website and it take a lot of times but in video you explain soo nicely and fast
Wait! I'm using your Learn Python app and it is really helpful!
for languages in ['Python','Swift','C++','C','Java']:
if languages =='Swift' or languages=='C++':
continue
print(languages)
tq
Learning Python is something you would like to get in your skills, but you do not know where to start? This NEW channel will help you out leaning Python Programming from scratch - for complete Beginners, Intermediate and Advanced Levels
languages = ["Python", "Java", "Swift", "C", "C++"]
for language in languages:
if language == "Swift" or language == "C++":
continue
print(language)
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)
languages = ["Python", "Java", "Swift", "C", "C++"]
result =[]
for language in languages:
if language in ["Swift"]:
continue
if language in ["C++"]:
break
result.append(language)
print(f"The Output is {result}")
The Output is ['Python', 'Java', 'C']
lang = ["python","java","swift","c","c++"]
for x in lang:
if (x == "java"):
continue
elif (x == "c++"):
continue
print(x)
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
I appreciate you man, thanks for these tutorials
Thanks for clearing my confusion, it was really helpful but take care of your head don't move it so much it might "Break" and you may not be able to "Continue" with such series.
where is the github link sir?
why used float number here? if we use int number what will happened
Sir when next video will post
Wow you are such a great mentor , really helping to build basics :) God Bless you :)
thisset = {'python', 'java', 'c', 'swift', 'c++'}
for x in thisset:
print(x)
if x == 'switf' 'c++':
continue
thank you for this video it was helpful :)
Dude you are an excellent teacher...am now enjoying coding
languages=['python','java','swift','c','c++']
for language in languages:
languages=['python','java','swift','c','c++']
if language==('swift'):
continue
if language==('c++'):
break
print(language)
Op sir. With your 1video I can understand easily.
I think you are a South Indian🇮🇳👳. I hope you will continue posting more videos regarding python. ❤❤
Yup, I am pretty sure because his first software job was in Hyderabad, India.
he is from nepal bro...
languages=["pyhton","java","c","c++","swift"]
for tongue in languages:
if tongue=="swift":
continue
elif tongue=="c++":
continue
else:
print(tongue)
here we go!!!
languages = ['python', 'java' 'swift', 'php', 'c', 'c++']
for i in languages:
if i == 'swift' or i == 'c++':
continue
print(i)
Y r we using or during the comparison
for languages in ['Python', 'Java', 'Swift', 'C', 'C++']:
if (languages == 'Swift' or languages == 'C++'):
continue
print("Language is: ", languages)
I am new in programing . After several attempts, I found out the answer on the Github repository is wrong. Correct code should be
list = ["Python", "Java", "Swift", "C", "C++"]
for item in list:
if item == "Swift" or item =="C++"
continue
print(item)
Sorry it is right, I realized my mistake
you forgot to put : at the end of the if item == "Swift" or item =="C++":
languages =["Python", "Java", "C", "Swift", "C++"]
for character in languages:
if character == "Swift" or character =="C++":
break
print(character)
Or......
languages =["Python", "Java", "C", "Swift", "C++"]
for character in languages:
if character == "Swift" or character =="C++":
continue
print(character)
I do not recommend the first solution, it will work in this case because Swift and C++ are the last values in the list, but if one of them was the first item on the list then the loop would break and none of the languages would be printed.
@@pinkshoelace8388 yes i agree. I realised this when I progressed in python. Thanks for spotting :-)
What means float(input())?
Thanks!
Float means decimal numbers like 10.6, 9.0, 4.89, etc.
If you try "int" instead of "float" it will only give you integer values like 10, 9, 4 and not the decimal values.
languages = ["Python", "Java", "Swift", "C", "C++"]
for item in languages:
if item=="Swift" or item=="C++":
continue
print(item)
Programming is also about optimizing the code. I see a lot of people in the comment just making the program complex unnecessarily.
languages = ["Python", "Java", "Swift", "C", "C++"]
for item in languages:
if item == "Swift" or item == "C++":
continue
else:
print(item)
The logic you are trying to use is correct> However, there is an error in the test condition. Change the test condition to:
item == "Swift" or item == "C++"
@@programizstudios Thanks
@@programizstudios but isn't it the same thing sir?
Nice Tutorial
nice explanation
#Can you create a program so that all items of the language are printed except swift and C++
# language=["Python","Java","Swift", "c","c++"]
language=["Python","Java","Swift","C","C++"]
for i in language:
if i=="Swift":
continue
elif i=="C++":
continue
else:
print(i)
lang = ["Python", "Java", "Swift", "C", "C++"]
for item in lang:
if item == "Swift" or item == "C++":
continue
print(item)
languages=["python","java","swift","c","c++"]
for i in languages:
if i=="swift":
continue
if i=="c++":
continue
print(i)
print("h")
languages = [ “python” , “Java” , “swift” , “C” , “C++” ]
for i in languages:
if i == “C++”:
continue
elif i == “swift”:
continue
print(i)
languages = ['python', 'java', 'swift', 'C', 'C++']
for item in languages:
if item == 'swift' or item == 'C++':
continue
print(item)
-- Programming Task Answer --
language = ["Python", "Java", "Swift", "C", "C++"]
for item in language:
if item=="Swift" or item=="C++":
continue
print(item)
Thank u so much sir...
languages = ["Python", "Java", "Swift", "C", "C++"]
for i in languages:
if i == "Swift" or i == "C++":
continue
print(i)
languages=["python","java","c","c++","swift"]
exclude=["java","c"]
for i in languages:
if i in exclude:
continue
else:
print(i)
Thank you!
languages = [ " python" , " java" , " swift", " c" , " c++"]
for language in langyages :
print ( language)
if language =" swift" or language = " c++"
break
I forgot about OR, so my code is:
languages = [ ]
for language in languages:
if language == 'swift':
continue
if language =='C++':
break
print(language)
lang = ['python','java','swift','c','c++']
for i in lang:
if (i==lang[2]) or (i==lang[4]) :
continue
else:
print(i)
languages = ["Python", "Java", "Swift", "C", "C++"]
for langauge in languages:
if language == "Swift" or language == "C++":
continue
print(langauge)
output :- Traceback (most recent call last):
NameError: name 'language' is not defined
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])
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)
thank u!
where the fuck did the for and in range come from there is no tutorial for that in this series
my like turned your video from 1.4k to 1.5k
#Question_answer
language = ["Python", "Java", "Swift", "C", "C++"]
for p_language in language:
if p_language == "Swift":
continue
if p_language == "C++":
continue
print(p_language)
lang=["Python","Java","Swift","C","C++"]
lang.remove("Swift")
lang.remove("C++")
print(lang)
you should use loop and what is thought in this vid
my_list = ["python", "Java", "Swift", "C", "C++"]
for i in my_list:
if i == "Swift" or i == "C++":
continue
print(i, end=",")
languages = ["Python", "Java", "Swift", "C", "C++"]
print(languages[0])
print(languages [1])
print (languages [3])
languages=["python","java","swift","c","c++"]
print(languages[0,1,3])
Is this acceptable?
lang = ["Python", "Java", "Swift", "C", "C++"]
for i in lang:
if i == lang[2]:
continue
if i == lang[4]:
continue
print(i)
[print(i) for i in ["python", "java", "swift", "c++", "c"] if i!="swift" and i!="c++"]
languages = ["Python", "Java", "Swift", "C", "C++"]
without break&continue:
for i in languages:
if i != "Swift" and i !="C++":
print(i)
with break&continue:
for i in languages:
if i == "Swift":
continue
if i == "C++":
continue
print(i)
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']
No thank you! ❤
you didn't turn your head enough
😇
Thalakai oopadam aaparaa babu
Binod
Why Break and continue are giving no output? Just blank, not any warning,
Write exactly same but no output, only the end has printed
for languages in ['Python', 'Java', 'Swift', 'C', 'C++']:
if (languages == 'Swift'or languages == 'C++'):
continue
print(languages)
languages = ["Python","Java","Swift","C","C++"]
for i in languages:
if i == languages[2] or i == languages[4]:
continue
else:
print(i)
languages = ["Python", "Java", "Swift", "C", "C++"]
for language in languages:
if language == "Swift" or language == "C++":
continue
print(language)
languages = ['python','java','swift','c','c++']
for language in languages:
if language == 'swift' or language == 'c++':
continue
print(language)
languages = ['Python', 'Java', 'C', 'Swift', 'C++']
for i in languages:
if i == 'C++' or i == 'Swift':
continue
else:
print(i)
languages=("Python" , "java" , "Swift" ,"C","C++")
for language in languages:
if language=="Swift" or language=="C":
continue
print(language)
languages = ["Python", "Java", "Swift", "C", "C++"]
for language in languages:
if language == "Swift" or language == "C++":
continue
print(language)
but u just ripped-off that other comment tho
languages = ["Python", "Java", "Swift", "C", "C++"]
for i in languages:
if i=='Swift' or i=='C++':
continue
print(i)
languages = 'Python', 'Java', 'Swift', 'C', 'C++'
for language in languages:
if language == 'Swift' or language== 'C++':
continue
print(language)
languages = ["Python","Java","swift","C","C++"]
for i in languages:
if i=="swift" or i=="C++":
continue
print(i)
languages = ["Python", "Java", "Swift", "C", "C++"]
for language in languages:
if language == "Swift" and "C++":
continue
print(language)
languages=["c++","c","phyton","swift","rust"]
for language in languages:
if language == "swift" or language == "c++":
continue
print(language)