+================================ +== == == == == == == == == == ==+ - (enter number"quit"or stream of up/down letters --snip-how it works the displayabacus(function accepts number argument used to figure out where it should render beads on the abacus the soroban always has exactly possible locations for either 'obeads or '|rod segmentsas marked by the curly braces ({}in the multiline string on lines to another curly braces represent the digits of the number argument we need to create list of strings to fill in these curly bracesgoing from left to righttop to bottom the code in displayabacus(will populate hasbead list with true value to display 'obead and false value to display '|the first values in this list are for the top "heavenrow we'll put bead in this row if the column' digit is or since the heaven bead won' be in that row unless the digit for that column is to we add boolean values to hasbead for the remaining rows lines to use hasbead to create an abacuschar list that contains the actual 'oand '|strings when combined with numberlist on line the program forms chars list that populates the curly braces ({}for the multiline-string ascii art of the soroban """soroban japanese abacusby al sweigart al@inventwithpython com simulation of japanese abacus calculator tool more info at view this code at tagslargeartisticmathsimulation"" number_of_digits def main() print('soroban the japanese abacus' print('by al sweigart al@inventwithpython com' print( abacusnumber this is the number represented on the abacus soroban japanese abacus