Python program to do with percentages and chances, random generation.

Overview

Chances and Percentages

Python program to do with percentages and chances, random generation.

What is this?

This small program will generate a list with random values inside of it. There are 3 values, A, B, and C. The chance of A being in the list is 0.75, B chance is 0.50, C chance is 0.25, and for it to be empty is 0.50. The chance of getting that list will be calculated for you, for example if you get all 3 values empty the chance of getting that is 0.125%, because 0.50**3 is 0.125.

Decoding a chance into a list

When you call the generate_table() function you can pass an arguemnt if you want. That argument should be a chance, for example 0.125. Let's say we pass in 0.125 as the chance, the program will decode it into a list of values and a list of our 4 values, A, B, C, and nothing. If we pass in 0.125 then it will decode it into all 3 chances having to be 0.50. Then it will generate the table/list of our values, so the list will either be full of B's or will be totally empty.

Make sure you pass in a valid chance otherwise it won't work! You can modify the chances as well by modifying the variables at the top of the code.

You might also like...
Generates a random prnt.sc link and display image.

Generates a random prnt.sc link and display image.

 Genart - Generate random art to sell as nfts
Genart - Generate random art to sell as nfts

Genart - Generate random art to sell as nfts Usage git clone

Random Number Generator

Application for generating a random number.

Generate random german words
Generate random german words

Generate random german words / Generiere zufällige deutsche Wörter Getting Started Pip install with pip install zufallsworte Install the library with

Go through a random file in your favourite open source projects!

Random Source Codes Never be bored again! Staring at your screen and just scrolling the great world wide web? Would you rather read through some code

Backman is a random/fixed background image setter for wlroots based compositors

backman Backman is a random/fixed background image setter for wlroots based compositors Dependencies: The program depends on swaybg, python3-toml (or

A quick random name generator

Random Profile Generator USAGE & CREDITS Any public or priavte demonstrative usage of this project is strictly prohibited, UNLESS WhineyMonkey10 (http

Create password - Generate Random Password with Passphrase

Generate Random Password with Passphrase This is a python code to generate stron

This python program will display all SSID usernames and SSID passwords you once connected to your laptop
This python program will display all SSID usernames and SSID passwords you once connected to your laptop

Windows-Wifi-password-extractor This python program will display all SSID usernames and SSID passwords you once connected to your laptop How to run th

Owner
n0
Hello everyone seeing this! I'm just a normal coder who specialized in Python and Unity/C# mostly, I also code in VB.NET, C++, and Java a bit.
n0
Simple Python tool that generates a pseudo-random password with numbers, letters, and special characters in accordance with password policy best practices.

Simple Python tool that generates a pseudo-random password with numbers, letters, and special characters in accordance with password policy best practices.

Joe Helle 7 Mar 25, 2022
An okayish python script to generate a random Euler circuit with given number of vertices and edges.

Euler-Circuit-Test-Case-Generator An okayish python script to generate a random Euler circuit with given number of vertices and edges. Executing the S

Alen Antony 1 Nov 13, 2021
A simple and easy to use collection of random python functions.

A simple and easy to use collection of random python functions.

Diwan Mohamed Faheer 1 Nov 17, 2021
A simple Python app that generates semi-random chord progressions.

chords-generator A simple Python app that generates semi-random chord progressions.

null 53 Sep 7, 2022
A random cats photos python module

A random cats photos python module

Fayas Noushad 6 Dec 1, 2021
A Random Password Generator made from Python

Things you need Python Step 1 Download the python file from Releases Step 2 Go to the directory where the python file is and run it Step 3 Type the le

Kavindu Nimsara 3 May 30, 2022
Random Number Generator Analysis With Python

Random-Number-Generator-Analysis Governor's Honors Program Project to determine

Jack Prewitt 2 Jan 23, 2022
Python Random Number Genrator

This Genrates Random Numbers. This Random Number Generator was made using python. This software uses Time and Random extension. Download the EXE file and run it to get your answer.

Krish Sethi 2 Feb 3, 2022
Dice Rolling Simulator using Python-random

Dice Rolling Simulator As the name of the program suggests, we will be imitating a rolling dice. This is one of the interesting python projects and wi

PyLaboratory 1 Feb 2, 2022
Color getter (including method to get random color or complementary color) made out of Python

python-color-getter Color getter (including method to get random color or complementary color) made out of Python Setup pip3 install git+https://githu

Jung Gyu Yoon 2 Sep 17, 2022