Re: [Tutor] Hi there,

2016-01-02 Thread Steven D'Aprano
On Sat, Jan 02, 2016 at 02:45:30PM +0200, yehudak . wrote: > I'm trying to write a Python 3.5 program to find how many trailing zeros > are in 100! (factorial of 100). > I downloaded factorial from Math module, but all my efforts to solve the > problem failed. > > I know the mathematical way to so

Re: [Tutor] Hi there,

2016-01-02 Thread Alan Gauld
On 02/01/16 12:45, yehudak . wrote: > I know the mathematical way to solve it (resulting in 24), but I want a > Python solution. Show us your code. Usually "the mathematical way to do it" works in Python too. Although there will likely be other ways that may sometimes run faster or easier to co

Re: [Tutor] Difference between rounding off and typecasting to int

2016-01-02 Thread Alan Gauld
On 02/01/16 14:33, Ratheesh kumar wrote: > But I can't get to understand what round() did int() cant't do With this kind of question its best to ask the interpreter: >>> int(12.1) 12 >>> int(12.9) 12 >>> round(12.1) 12 >>> round(12.9) 13 >>> Does that make it clearer? -- Alan G Author of the

[Tutor] Difference between rounding off and typecasting to int

2016-01-02 Thread Ratheesh kumar
Hii everyone, Today i was just solving a problem in hacker-rank. A simple one to calculate the tip and tax for the meal. The resultant answer should be rounded off. I first wrote the code as below: m=float(input()) x=int(input()) t=int(input()) tip=(m*x)/100 tax=(m*t)/100 total=m+tip+tax print("T

[Tutor] Hi there,

2016-01-02 Thread yehudak .
I'm trying to write a Python 3.5 program to find how many trailing zeros are in 100! (factorial of 100). I downloaded factorial from Math module, but all my efforts to solve the problem failed. I know the mathematical way to solve it (resulting in 24), but I want a Python solution. Thank you. ___

Re: [Tutor] trouble with beautiful soup

2016-01-02 Thread marcus lütolf
-Ursprüngliche Nachricht- Von: Danny Yoo [mailto:d...@hashcollision.org] Gesendet: Freitag, 1. Januar 2016 19:17 An: Alan Gauld Cc: marcus lütolf ; Python Tutor Mailing List Betreff: Re: [Tutor] trouble with beautiful soup According to the documentation for Beautiful Soup 3, http

Re: [Tutor] antigravity?!?

2016-01-02 Thread Steven D'Aprano
On Sat, Jan 02, 2016 at 12:46:01AM -0600, boB Stepp wrote: > Ok, you Python developers (If any follow the Tutor list.) are a quirky > lot! Thinking about Martin's suggestion to explore the standard > library, I typed "py" in my W7 Command Prompt, followed by "help()" > and then modules to see what

Re: [Tutor] What potential problems might I encounter installing Anaconda?

2016-01-02 Thread Alan Gauld
On 02/01/16 04:26, boB Stepp wrote: > 1) At this time I have no need for multiple versions of Python on my > home PC. Would it be advisable for me to uninstall my existing v. > 3.4.4 as the Anaconda distribution I am looking at uses v. 3.5? It shouldn';t make any difference. Anaconda and v3.4 ca