Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions LoopControl.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
2 changes: 1 addition & 1 deletion TuplesAndList.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
18 changes: 8 additions & 10 deletions conditional_if_elif.py
Original file line number Diff line number Diff line change
@@ -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")
Expand All @@ -19,4 +17,4 @@ def main():



if __name__ == '__main__':main()
if __name__ == '__main__':main()