Showing posts with label While Loop. Show all posts
Showing posts with label While Loop. Show all posts

Monday, May 11, 2020

Python Class 116 - Kapil Sharma

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

Sunday, May 10, 2020

Python Class 115 - Kapil Sharma

#For Loop Example - 1:
my_Money5 = ["Dollar","Rupee","Ruble"]

for Money in my_Money5:
      print (Money, "Currency")
      
#For Loop Example - 2:
for i in range(1000):
    print ("i= ", i)
    if (i == 999):
        break

#While Loop:
count = 0
while count < 10:
    print("Count is less than ten.", count)
    count+=1

Blockchain: 101 (By - Kapil Sharma)

 https://testing-mines.blogspot.com/2021/10/blockchain-101-by-kapil-sharma.html Blockchain through the following attributes: Distributed:  T...