bluehost

Wednesday, 27 September 2023

Making Of Multiplication Table ;Python.

Today I want to share with you a short python project. A multiplication table python project. The is one of the shortest projects I have ever created. It contains less than five lines of code, but at the end of the coding, you get one of the best multiplication tables.

Codes.
As you can see, we have used four lines of code. With these four lines, you can adjust the codes inside and produce a better multiplication table of any length.

Inline one, for x in range (0,16) means we want our table to show multiplication of from zero to fifteen .since the counting in python starts from zero, we end up getting a table of from zero to fifteen. The last number is never counted.

If you want to produce a table of up to a higher number, you can replace 16 with any bigger number like 17,18,19,20, etc.

For I in range(0,8) means we want to multiply each number in x with zero to eight.  you can also adjust your table by replacing 8 with any bigger 
After using just four lines of codes, you end up getting an amazing multiplication table like this.
You can use the above codes and see if you can get a better table than this.

No comments:

Post a Comment

React vs Angular; Front-End Web Development

Angular and React  are two of the most popular Javascript tools for front-end development. React is a Javascript created by Meta...