0

prints out a multiplication table where each number is the result of multiplying the first number of its row by the number at -

- the top of its column (it is the part of the question as i was not able to complete my question within the title section so i typed it here) for example func(1 ,3) 1 2 3 2 4 6 3 6 9

8th Mar 2020, 3:05 PM
Somya Sarathi Samal
Somya Sarathi Samal - avatar
5 Antworten
+ 3
for row in range(1, 4): for col in range(1, 4): print(row * col, end=' ') print() You'll have to put this in a function to make the parameters more dynamic, and probably add better formatting so that each number takes the same number of characters
8th Mar 2020, 5:25 PM
Tibor Santa
Tibor Santa - avatar
+ 5
Post your code.
8th Mar 2020, 3:08 PM
Pedro H.J
Pedro H.J - avatar
+ 3
8th Mar 2020, 5:40 PM
Pedro H.J
Pedro H.J - avatar
0
def multiplication_table(start, stop): for x in range(start,stop+1): for y in range(start,stop+1): print(str(x*y), end=" ") print()
9th Jul 2020, 4:19 PM
Naman Shah
Naman Shah - avatar
- 1
@Pedro H.j I tried to solve it using nested for loop but, I was not able to solve it.....
8th Mar 2020, 3:29 PM
Somya Sarathi Samal
Somya Sarathi Samal - avatar