Python Forum
Troubles with program
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Troubles with program
#35
(May-28-2020, 02:26 PM)pyzyx3qwerty Wrote: @Harambe it is recommended you use Python 3 though - Python 2 isn't supported anymore

I wanted to but my iPad has problems with the new version Big Grin

import random
number=sorted(random.sample(range(1,1501)))
for i in range(100):
   letters=sorted(random.sample('abcdefgh',4))
    print(str(number) + '.' + ' ' + ','.join(letters))
Error in 2nd line. I dont know why. Range command includes start, stop and count value. Didnt write 1 as count cause it is given automatically.
Reply


Messages In This Thread
Troubles with program - by Harambe - May-27-2020, 10:38 PM
RE: Troubles with program - by Larz60+ - May-27-2020, 11:07 PM
RE: Troubles with program - by Harambe - May-27-2020, 11:09 PM
RE: Troubles with program - by Larz60+ - May-27-2020, 11:17 PM
RE: Troubles with program - by Harambe - May-27-2020, 11:25 PM
RE: Troubles with program - by deanhystad - May-28-2020, 05:12 AM
RE: Troubles with program - by perfringo - May-28-2020, 06:20 AM
RE: Troubles with program - by Knight18 - May-28-2020, 06:34 AM
RE: Troubles with program - by Harambe - May-28-2020, 09:25 AM
RE: Troubles with program - by buran - May-28-2020, 09:34 AM
RE: Troubles with program - by Harambe - May-28-2020, 10:04 AM
RE: Troubles with program - by pyzyx3qwerty - May-28-2020, 10:16 AM
RE: Troubles with program - by Harambe - May-28-2020, 10:25 AM
RE: Troubles with program - by pyzyx3qwerty - May-28-2020, 10:59 AM
RE: Troubles with program - by Harambe - May-28-2020, 11:04 AM
RE: Troubles with program - by pyzyx3qwerty - May-28-2020, 11:13 AM
RE: Troubles with program - by Harambe - May-28-2020, 11:49 AM
RE: Troubles with program - by GOTO10 - May-28-2020, 12:14 PM
RE: Troubles with program - by pyzyx3qwerty - May-28-2020, 12:23 PM
RE: Troubles with program - by Harambe - May-28-2020, 12:52 PM
RE: Troubles with program - by pyzyx3qwerty - May-28-2020, 01:09 PM
RE: Troubles with program - by GOTO10 - May-28-2020, 01:09 PM
RE: Troubles with program - by BitPythoner - May-28-2020, 01:12 PM
RE: Troubles with program - by Harambe - May-28-2020, 01:27 PM
RE: Troubles with program - by GOTO10 - May-28-2020, 01:29 PM
RE: Troubles with program - by Harambe - May-28-2020, 01:32 PM
RE: Troubles with program - by GOTO10 - May-28-2020, 01:36 PM
RE: Troubles with program - by Harambe - May-28-2020, 01:40 PM
RE: Troubles with program - by GOTO10 - May-28-2020, 01:41 PM
RE: Troubles with program - by Harambe - May-28-2020, 01:44 PM
RE: Troubles with program - by GOTO10 - May-28-2020, 01:45 PM
RE: Troubles with program - by Harambe - May-28-2020, 01:58 PM
RE: Troubles with program - by pyzyx3qwerty - May-28-2020, 02:26 PM
RE: Troubles with program - by Harambe - May-28-2020, 04:37 PM
RE: Troubles with program - by GOTO10 - May-28-2020, 05:05 PM
RE: Troubles with program - by GOTO10 - May-28-2020, 02:29 PM
RE: Troubles with program - by Harambe - May-28-2020, 05:05 PM
RE: Troubles with program - by GOTO10 - May-28-2020, 05:12 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Calling a list troubles giveen 7 4,054 Jan-11-2019, 08:05 PM
Last Post: giveen
  Troubles on how to use Open CV knowledge1st 1 2,571 May-23-2018, 05:57 PM
Last Post: Larz60+

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020