Re: [Tutor] I flip a coin 1 million times what is the consecutive times it will come up head and come up tails

2019-02-27 Thread Abdur-Rahmaan Janhangeer
XD that will help in the future, yes it was not unreadable this one. Abdur-Rahmaan Janhangeer http://www.pythonmembers.club | https://github.com/Abdur-rahmaanJ Mauritius ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription option

Re: [Tutor] I flip a coin 1 million times what is the consecutive times it will come up head and come up tails

2019-02-27 Thread Steven D'Aprano
On Tue, Feb 26, 2019 at 01:34:33PM -0700, shaef...@q.com wrote: > I am learning python. I wanted to test my ability by making a program to > keep track of the flip of a coin to find how many consecutive times it came > up heads and tails. Here's how to count the number of times it comes up heads

Re: [Tutor] I flip a coin 1 million times what is the consecutive times it will come up head and come up tails

2019-02-27 Thread Alan Gauld via Tutor
On 27/02/2019 09:35, Abdur-Rahmaan Janhangeer wrote: > maybe try dpaste.de or something like that for code pasting ^^_ That can be useful if it's very long code but this is actually quite a short program and it's much easier to reply to if the code is in the message so I think the OP did the right

Re: [Tutor] I flip a coin 1 million times what is the consecutive times it will come up head and come up tails

2019-02-27 Thread Abdur-Rahmaan Janhangeer
maybe try dpaste.de or something like that for code pasting ^^_ Abdur-Rahmaan Janhangeer http://www.pythonmembers.club | https://github.com/Abdur-rahmaanJ Mauritius ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: ht

Re: [Tutor] I flip a coin 1 million times what is the consecutive times it will come up head and come up tails

2019-02-26 Thread Alan Gauld via Tutor
On 26/02/2019 20:34, shaef...@q.com wrote: > I am learning python. I assume you are coming from some other language? If not you have managed to come up with the most convoluted and un-pythonic way imaginable to do a fairly simple task! > I wanted to test my ability by making a program to > keep

[Tutor] I flip a coin 1 million times what is the consecutive times it will come up head and come up tails

2019-02-26 Thread shaeffer
I am learning python. I wanted to test my ability by making a program to keep track of the flip of a coin to find how many consecutive times it came up heads and tails. Just want some criticism on what I have done. import random Hn = {} Tn = {} for i in range (0,31): va