Computer Science, asked by rajpiyush72, 1 year ago

write table of two in python program

Answers

Answered by Lensmen
1
n=int(input("enter number"))
m=1
for i in range(1,11,1):
m=(n*i)
print(n,"*",i,"=",m)
Answered by AskewTronics
0

Below are the output and the python program for the table of 2.

Output

The program will print the table of 2.

Explanation:

i=1#take a variable for increment and false for the while loop.

while(i<=10):#while loop which runs for the value of

   print(2*i)#print the table.

   i=i+1#operation for while condition.

Code Explanation :

  • The above code is in python language, which holds one while loop which runs from 1 to 10.
  • Then the print statement prints the table of 2 after multiplying the conditional variable by 2.
  • Then the increment operation is there which forces the condition to be false in a finite amount of time.

Learn More :

  • Python : https://brainly.in/question/14689905
Similar questions