Harshita-Kanal / Data-Structures-and-algorithms

This repository would be a documentation of my journey towards learning Data structures and algorithms. Please :star: this repo if you liked the effort :smile:
23 stars 128 forks source link

Create Python-StairDiceProblem.py #27

Closed Ishaan0905 closed 4 years ago

Ishaan0905 commented 4 years ago

Problem: A dice with numbers 1 to 6 is rolled 100 times. A person is climbing stairs as per these rules:

Find the % of chance of him reaching above step 60 after 100 rolls

Solution: Ideally, it requires infinite iterations as test data, but we take 50,000 iterations max so that it runs easily. User can decide number of iterations upto 50,000 and run the program to find out the percentage

Ishaan0905 commented 4 years ago

1