Python Forum
Logic error when comparing randomly generated integers
Thread Rating:
  • 1 Vote(s) - 2 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Logic error when comparing randomly generated integers
#6
Quote:The sample function gives you a random sample from a sequence (the first parameter), that is k items long (the second parameter), without replacement (no index from the sequence is chosen more than once). The full documentation is here: https://docs.python.org/3/library/random...dom.sample. Learn to browse the documentation, it is quite good.

Thank you so much!
Reply


Messages In This Thread
RE: Logic error when comparing randomly generated integers - by SadoDeomeoon - Jun-05-2017, 02:38 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  pyaudio seems to randomly halt input. elpidiovaldez5 2 397 Jan-22-2024, 09:07 AM
Last Post: elpidiovaldez5
  Logic suggestions for comparing 2 csv's cubangt 7 1,145 Nov-09-2023, 09:54 PM
Last Post: cubangt
  Problem with code / audio is playing randomly, not matching csv requirements Daniel_kcr 2 644 Sep-07-2023, 05:09 PM
Last Post: deanhystad
  HOW TO USE C# GENERATED DLL davide_vergnani 2 1,664 Jun-12-2023, 03:35 PM
Last Post: davide_vergnani
  boto3 - Error - TypeError: string indices must be integers kpatil 7 1,287 Jun-09-2023, 06:56 PM
Last Post: kpatil
  Error "list indices must be integers or slices, not str" dee 2 1,476 Dec-30-2022, 05:38 PM
Last Post: dee
  Python Logic Error rmfooty 3 947 Dec-05-2022, 01:44 PM
Last Post: rmfooty
  how to take a screnshot by Pyautogui automatically and randomly rachidel07 0 3,567 Feb-03-2021, 01:16 PM
Last Post: rachidel07
  list indices must be integers or slices, not lists error djwilson0495 2 2,893 Aug-27-2020, 06:13 PM
Last Post: deanhystad
  comparing integers and fractions tantony 3 2,021 Oct-02-2019, 04:32 PM
Last Post: tantony

Forum Jump:

User Panel Messages

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