myFood=['bread','milk','rice']
print(myFood)
for food in myFood:
print("I want " + food + ".")
====================================
myFriends = ["Puneet", "Himanshu", "Dushyant", "Mohit"]
for mybuddy in myFriends:
print(myFriends, 'are my friends.')
==================================
K =1
while K < 10:
print(K)
K += 1
======================
number = 0
while number <= 9:
number += 1
print("Loop count:", number)
======================
from pip._vendor.distlib.compat import raw_input
myName = raw_input("Please enter your name: ")
while myName == "Kapil":
print("You entered the correct name.")
break
else:
print("Wrong Input")
==========================================
https://github.com/bornfreesoul/PythonLessons https://www.youtube.com/channel/UCe0rLJmSQXNoK2Mo2eMVuvg
print(myFood)
for food in myFood:
print("I want " + food + ".")
====================================
myFriends = ["Puneet", "Himanshu", "Dushyant", "Mohit"]
for mybuddy in myFriends:
print(myFriends, 'are my friends.')
==================================
K =1
while K < 10:
print(K)
K += 1
======================
number = 0
while number <= 9:
number += 1
print("Loop count:", number)
======================
from pip._vendor.distlib.compat import raw_input
myName = raw_input("Please enter your name: ")
while myName == "Kapil":
print("You entered the correct name.")
break
else:
print("Wrong Input")
==========================================
https://github.com/bornfreesoul/PythonLessons https://www.youtube.com/channel/UCe0rLJmSQXNoK2Mo2eMVuvg
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.