Create a multiplication Table with while loop in VS Code

 i=1#created a variable name-'i' and assigned the value 1 to it.

n=int(input("Enter a number to create Multiplication table\n"))
#created a int type variable name-'n' and assigned the user input value to it.
while(i<=15):#command for loop iteration times.       
      print(n,"*",i,"=",n*i)
      #printing the value of n,symbol of multiplication,
      #value of i,symbol of equals sign and n*i'''
      i=i+1# increaminting the valu of i +1 in cach iteration.
print("Multiplication Table of ",n,"is printed")

Comments

Popular posts from this blog

4 Stage Timer With DS3231RTC Module.

Interfacing KY038 sound sensor with Raspberry pi Pico

Interfacing MQ2 Gas & Smoke Sensor With Raspberry Pi Pico