Python Forum
Problems with a def function
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Problems with a def function
#5
(Oct-20-2019, 06:47 PM)profeteus Wrote: damn, that worked awsome! for the counts = [0] part, how do i turn the awnser into % from this part?

Like I said, you divide each count by the total number of values. So counts[3] / sum(counts) is the % chance you will roll a three (1 in 216).
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
Reply


Messages In This Thread
Problems with a def function - by profeteus - Oct-20-2019, 06:10 PM
RE: Problems with a def function - by ichabod801 - Oct-20-2019, 06:26 PM
RE: Problems with a def function - by profeteus - Oct-20-2019, 06:47 PM
RE: Problems with a def function - by ichabod801 - Oct-20-2019, 06:30 PM
RE: Problems with a def function - by ichabod801 - Oct-20-2019, 06:50 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Money conversion - problems with lists and .format function fatherted99 1 1,839 Mar-12-2020, 06:29 PM
Last Post: ndc85430
  function method problems drchar 2 2,939 Dec-11-2018, 02:38 PM
Last Post: buran

Forum Jump:

User Panel Messages

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