chintalatejas / Python-Random-Package

This is program is a perfect way to understand Pythons Random package and how to implement it.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Python-Random-Package

This program is a perfect way to understand the random package of Python and how to implement it.

Here,the user climbs up a fight of stairs.We will calculate the final position of the user from the starting position in 60 rounds. We also calculate the position he is in at every round. The user will roll a dice which decides how many steps he can take in one round.
1.If the dice shows less than equals to 2,the user has to go a step back
2.If the dice shows more than 2 and less than equals to 5,the user has to go a step foward.
3.If the dice shows more than 5(ie,dice shows 6),the user again rolls the dice and he goes that many step forward as the dice shows now.
We also need to keep in mind that the user has a tendency to fall down from the stairs and hence falls down to the starting position and again has to climb up the stairs.

About

This is program is a perfect way to understand Pythons Random package and how to implement it.


Languages

Language:Python 100.0%