Hi,
On 05/12/17 06:33, nick martinez2 via Python-list wrote:
I have a question on my homework. My homework is to write a program in which
the computer simulates the rolling of a die 50 times and then prints
(i). the most frequent side of the die (ii). the average die value of all
rolls.
For t
On 2017-12-13, Lawrence D’Oliveiro wrote:
> On Wednesday, December 13, 2017 at 10:17:15 AM UTC+13, Jon Ribbens wrote:
>> Try `pip install certifi`
>
> It really is preferable to install standard distro packages where available,
> rather than resort to pip:
>
> sudo apt-get install python3-cer
On 2017-12-11, F Massion wrote:
> Am Dienstag, 12. Dezember 2017 14:33:42 UTC+1 schrieb Jon Ribbens:
>> On 2017-12-11, F Massion wrote:
>> > ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed
> (_ssl.c:748)
>>
>> Try `pip install certifi`
>
> certifi was installed.
> If I ma
On Wed, Dec 13, 2017 at 10:38 PM, Jon Ribbens wrote:
> On 2017-12-13, Lawrence D’Oliveiro wrote:
>> On Wednesday, December 13, 2017 at 10:17:15 AM UTC+13, Jon Ribbens wrote:
>>> Try `pip install certifi`
>>
>> It really is preferable to install standard distro packages where available,
>> rather
Op 13-12-17 om 13:01 schreef Chris Angelico:
> On Wed, Dec 13, 2017 at 10:38 PM, Jon Ribbens
> wrote:
>> On 2017-12-13, Lawrence D’Oliveiro wrote:
>>> On Wednesday, December 13, 2017 at 10:17:15 AM UTC+13, Jon Ribbens wrote:
Try `pip install certifi`
>>> It really is preferable to install s
On Wed, Dec 13, 2017 at 11:26 PM, Antoon Pardon wrote:
> Op 13-12-17 om 13:01 schreef Chris Angelico:
>> On Wed, Dec 13, 2017 at 10:38 PM, Jon Ribbens
>> wrote:
>>> On 2017-12-13, Lawrence D’Oliveiro wrote:
On Wednesday, December 13, 2017 at 10:17:15 AM UTC+13, Jon Ribbens wrote:
> Try
nick.martin...@aol.com (nick martinez2) writes:
> def rollDie(number):
> rolls = [0] * 6
> for i in range(0, number):
> roll=int(random.randint(1,6))
> rolls[roll - 1] += 1
> return rolls
def rollDie(number):
from random import choices
return choices((1,2,3,4,5
On 2017-12-13, Chris Angelico wrote:
> On Wed, Dec 13, 2017 at 10:38 PM, Jon Ribbens
> wrote:
>> On 2017-12-13, Lawrence D’Oliveiro wrote:
>>> On Wednesday, December 13, 2017 at 10:17:15 AM UTC+13, Jon Ribbens wrote:
Try `pip install certifi`
>>>
>>> It really is preferable to install stan
from random import randint
rolls = [randint(1, 6) for x in range(50)]
print("Average: %s" % (sum(rolls) / len(rolls)))
print("Most Common: %s" % max(rolls, key=rolls.count))
--
https://mail.python.org/mailman/listinfo/python-list
On Thu, Dec 14, 2017 at 3:23 AM, wrote:
> from random import randint
>
> rolls = [randint(1, 6) for x in range(50)]
> print("Average: %s" % (sum(rolls) / len(rolls)))
> print("Most Common: %s" % max(rolls, key=rolls.count))
Great demo of a bad algorithm. :)
ChrisA
--
https://mail.python.org/ma
On Wed, Dec 13, 2017 at 5:43 AM, Chris Angelico wrote:
>
> A Windows equivalent would be to have a .py file associated normally
> with the regular console, but some individual ones associated with
> pythonw.exe - without renaming them to .pyw. AFAIK there is no way to
> do this on Windows short of
On Thu, Dec 14, 2017 at 7:56 AM, eryk sun wrote:
> On Wed, Dec 13, 2017 at 5:43 AM, Chris Angelico wrote:
>>
>> A Windows equivalent would be to have a .py file associated normally
>> with the regular console, but some individual ones associated with
>> pythonw.exe - without renaming them to .pyw
On Wed, Dec 13, 2017 at 9:04 PM, Chris Angelico wrote:
> On Thu, Dec 14, 2017 at 7:56 AM, eryk sun wrote:
>> On Wed, Dec 13, 2017 at 5:43 AM, Chris Angelico wrote:
>>>
>>> A Windows equivalent would be to have a .py file associated normally
>>> with the regular console, but some individual ones
On Wed, Dec 13, 2017, Lorenzo Sutton wrote:
>
On 05/12/17 06:33, nick martinez2 via Python-list wrote:
>> I have a question on my homework. My homework is to write a program in
>which
>> the computer simulates the rolling of a die 50 times and then prints
>> (i). the most frequent side of the die (
On 12/13/2017 8:28 AM, bo...@choices.random.py wrote:
nick.martin...@aol.com (nick martinez2) writes:
def rollDie(number):
rolls = [0] * 6
for i in range(0, number):
roll=int(random.randint(1,6))
One could just as well use randint(0, 5) and skip the -1 below.
rol
Hi,
We've just released Wing 6.0.9, which adds support for Vagrant, improves
support for Django and Plone, further improves remote development, fixes
startup problems seen on some OS X systems, and makes about 35 other
improvements. For details, see
https://wingware.com/pub/wingide/6.0.9/CHA
On Thursday, December 7, 2017 at 7:11:18 AM UTC-8, Rhodri James wrote:
> Sigh. Please don't do people's homework for them. It doesn't teach
> them anything. Now Nick had got 90% of the way there and shown his
> working, which is truly excellent, but what he needed was for someone to
> hint a
On Tuesday, December 12, 2017 at 10:42:54 PM UTC-6, eryk sun wrote:
[...]
> That said, I don't see this feature as being very useful
> compared to just using "open with" when I occasionally need
> to open a file with a non-default program.
That's the point i was trying to make, but i think it may
On Thu, Dec 14, 2017 at 12:35 PM, Rick Johnson
wrote:
> On Tuesday, December 12, 2017 at 10:42:54 PM UTC-6, eryk sun wrote:
> [...]
>> That said, I don't see this feature as being very useful
>> compared to just using "open with" when I occasionally need
>> to open a file with a non-default progra
On Wednesday, October 19, 2016 at 3:08:15 AM UTC-7, Paul Moore wrote:
> I'm looking to write a GUI application in Python (to run on Windows, using
> Python 3.5). The application is just a relatively thin wrapper around a
> browser - it's presenting an existing web application, just in its own wi
Am 14.12.17 um 02:55 schrieb Chris Angelico:
On Thu, Dec 14, 2017 at 12:35 PM, Rick Johnson
wrote:
On Tuesday, December 12, 2017 at 10:42:54 PM UTC-6, eryk sun wrote:
[...]
That said, I don't see this feature as being very useful
compared to just using "open with" when I occasionally need
to o
On Thu, Dec 14, 2017 at 5:44 PM, Christian Gollwitzer wrote:
> Am 14.12.17 um 02:55 schrieb Chris Angelico:
>>
>> On Thu, Dec 14, 2017 at 12:35 PM, Rick Johnson
>> wrote:
>>>
>>> On Tuesday, December 12, 2017 at 10:42:54 PM UTC-6, eryk sun wrote:
>>> [...]
That said, I don't see this fe
22 matches
Mail list logo