Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Multiplication Table code
#1
Hello guys I need some help with my code.
I tried to do a multiplication table.
But I have no idea how do I move a table from the bottom to the side.
I added some graphical description of how i want to see the finale result.

My code Now.png is the attachment of what I got now.

Multiplication_table.png is the attachment of what i want to get.

Does someone have any idea of how to manipulate the tables view

Attached Files

Thumbnail(s)
       
Reply
#2
Is this a homework assignment where you are supposed to figure out how to print tabular data, or can you use Python libraries that make printing tabular data simple?
Reply
#3
Hi @alexsendlegames100 ,
Please show your code, then we can see what has to be changed.
Remember you can only print one line at a time, so you may have to change the order in which you do things.
You also want bars ( | ) to separate the tables, so you need to implement fixed width, like:
print(f"{number:2}")
... to make number occupy 2 characters.
Reply
#4
In addition to ibreeden's advice, you could use unicode's box drawing characters to make the output look like the one in the picture.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Try to solve GTG multiplication table problem. Frankduc 6 1,988 Jan-18-2022, 08:26 PM
Last Post: Frankduc
  Need help with my Python code (Multiplication) NeedHelpPython 2 1,676 Oct-04-2021, 12:09 PM
Last Post: Pedroski55
  Python code for exporting table using Selenium gj31980 4 2,991 Aug-04-2020, 01:29 AM
Last Post: gj31980
  Code import .CSV file to MySQL table rtakle 4 2,847 Apr-30-2020, 03:16 PM
Last Post: anbu23
  List conversion and multiplication johnkyp 5 3,159 Jan-02-2020, 08:20 AM
Last Post: perfringo
  Matrix Multiplication Issue VIJENDRA 1 1,860 Dec-19-2019, 06:16 PM
Last Post: Gribouillis
  Multiplication between a list and a variable doug2019 2 2,155 Oct-08-2019, 04:10 AM
Last Post: doug2019
  Multiplication Table number margins CJ707 4 2,430 Sep-18-2019, 02:16 PM
Last Post: CJ707
  multiplication by successive addition Zebrol 1 3,508 Sep-14-2019, 05:37 PM
Last Post: ichabod801
  Tracing a multiplication table w/ Python trace() NationalRex22 0 1,749 Jun-11-2019, 03:31 AM
Last Post: NationalRex22

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020