Computer Science, asked by kv09643, 7 months ago

write a program to print table of a number​

Answers

Answered by aryanprasadblr
1

This is the program in python to print a table as you have not mentioned which program to use.

for example, your table's name is list

list = [1,2,3,4,5,6,7,8]

then you will run a for loop so that the code in the loop runs for every item in a table

for i in list:

    print(str(i))

in this code we are saying it to run print for every oblect or number in the table using i as the reference to the current object or number it is running the code for. so as the i's value keep changing as it runs we keep printing the value of i in string for which we use str(). this will print all the numbers in a table

 

Similar questions