diff --git a/LoopControl.py b/LoopControl.py index 7b41ece..352b8ab 100644 --- a/LoopControl.py +++ b/LoopControl.py @@ -7,9 +7,9 @@ def main(): for letter in word: if(letter=='t'): pass - print(" blcok is padded") + print(" block is padded") print(letter) - print("progam end") + print("program end") if __name__ == '__main__':main() diff --git a/TuplesAndList.py b/TuplesAndList.py index 2acb371..4a1294d 100644 --- a/TuplesAndList.py +++ b/TuplesAndList.py @@ -10,7 +10,7 @@ def main(): Ages.insert(0,33) print(Ages) #Tuples - Ages=[44,33,45,33,54] + Ages=(44,33,45,33,54) Ages.append(100) Ages.insert(0,33) print(Ages) diff --git a/conditional_if_elif.py b/conditional_if_elif.py index 8ae7e05..6cf901a 100644 --- a/conditional_if_elif.py +++ b/conditional_if_elif.py @@ -1,15 +1,13 @@ def main(): - Age=input("enter your Age:") - if(int(Age)>=8 and int(Age)<=10): + Age=int(input("enter your Age:")) + if(Age>=8 and Age<=10): print("children") - print("children") - print("children") - print("children") - elif(int(Age)>=11 and int(Age)<=15): + + elif(Age>=11 and Age<=15): print("kids") - elif(int(Age)>=16 and int(Age)<=18): - print("Tingers") - elif(int(Age)>=19 and int(Age)<=30): + elif(Age>=16 and Age<=18): + print("Teen-agers") + elif(Age>=19 and Age<=30): print("Young") else: print("Out of range") @@ -19,4 +17,4 @@ def main(): -if __name__ == '__main__':main() \ No newline at end of file +if __name__ == '__main__':main()