18/19 ..i have done it.but i dont get it


#1

people can u tell me why is the else statement at the end outside the for loop


#2

If you have else inside the loop, either if is true or else will execute in the first run of the loop, the loop returns something, the loop ends. So the loop only makes one run. If the else is outside the while loop, else gets returned if the if statement is not true for all values in your loop.

Go ahead, add the else inside your loop, add a print statement in your loop, you will see the loop gets executed only once


#3

ty man
can u help me out..i mean i have learned python from here but still i m not fully confident that i know it


#4

Well, that takes time. I suggest to build something? Start simple, build caesar cipher, if you don't know what this is, do a google search, then expand it by rather then one letter, shift it with a word. Or choice something of your own liking. Learning the syntax of a programming language is rather easy. Understanding the algorithms, building programs, implanting and designing things, that is the tricky bit