Computer Science, asked by karishmarajak, 11 months ago

Python
2)Print multiplication table of 14 from a list in which multiplication of 12 restore ​

Answers

Answered by dikshasingh27
3

Answer:

how to create table of any number we created 12

table_12=[]

for i in range(1,121):

if i % 12==0:

table_12.append(i)

print(table_12)

#Print multiplication table of 14 from a list in which multiplication table of 12 is stored.

table_14=[]

for i in table_12:

i=i+2

table_14.append(i)

print(table_14)

Answered by AskewTronics
1

Following are the program for the above question:

Explanation:

Table_of_12=[]#list to hold the 12 table.  

for index in range(1,11): #loop to recods 12 table.

       Table_12=index*12 #operation for 12 table.

       Table_of_12.append(Table_12) #list built for 12 table.

Table_of_14=[] #List to hold the 14 table.

increment=1 #variable for increment in 12 table.

for index in Table_of_12: #loop to record 14 table.

   index=index+increment*2 #operation to make 14 table.

   Table_of_14.append(index) #list build for 14 table.

   increment=increment+1 #increament operation.

print(Table_of_14)#print the 14 table.

Output:

  • The above code print the table of 14.

Code Explanation:

  • The above code is in python language which holds the two lists and two loops, one is used for the table of 12 and the other is used for the table of 14.
  • The first list holds the table of 12, and then the content of the list makes the table of 14 after doing some operation.

Learn More:

  • Python program : https://brainly.in/question/5558161
Similar questions