formatting - Python's Multiplication Function -


in python found multiplication solution useful software writing.

problem when using software, user asked question (i.e 8x2) prints command-type line (i.e 14). not user friendly , display in simpler form, common writing form (8x2). post pictures integrate question.

on right result screen, on left code itself. if have more questions please ask.

you can add dictionary operator descriptions:

op_symbols = {     add: '+',     mul: '*',     sub: '-', } 

and instead of str(op), use op_symbols[op]


Comments

Popular posts from this blog

apache - PHP Soap issue while content length is larger -

asynchronous - Python asyncio task got bad yield -

javascript - Complete OpenIDConnect auth when requesting via Ajax -