[Tutor] calculator will not multiply

David david at abbottdavid.com
Sun Jan 18 22:26:27 CET 2009


Marc Tompkins wrote:

> It works for me under Windows XP, so I suspect that the hints you've 
> received about * being expanded by your shell are correct.  However, I 
> had an idea - rather than requiring your user to put quotes around the 
> "*", why not do this:
> 
>    elif sys.argv[2] in ["*","x","X"]:
>        total = mul(int(sys.argv[1]), int(sys.argv[3]))
>        print total
Thank you :)
> 
> This could be a problem if you wanted to develop your calculator into a 
> full-fledged scientific calculator, but otherwise...
I may need just a little more practice, not because of a lack of effort, 
but there seems to be a small problem with retention :(

> 
> 
> -- 
> www.fsrtechnologies.com <http://www.fsrtechnologies.com>
500 server error
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> http://mail.python.org/mailman/listinfo/tutor


-- 
Powered by Gentoo GNU/LINUX
http://www.linuxcrazy.com
pgp.mit.edu



More information about the Tutor mailing list