Skip to content

Like the title suggests, this project involves writing a program that simulates rolling dice. When the program runs, it will randomly choose a number between 1 and 6. (Or whatever other integer you prefer — the number of sides on the die is up to you.) The program will print what that number is. It should then ask you if you’d like to roll again

Notifications You must be signed in to change notification settings

Daniel-TheProgrammer/Dice-Rolling-Simulator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 

Repository files navigation

Dice Rolla

Dice Rolling Simulator from Five mini programming projects for the Python beginner

The Goal

Like the title suggests, this project involves writing a program that simulates rolling dice. When the program runs, it will

  • randomly choose a number between 1 and 6
  • print what that number is
  • ask you if you’d like to roll again

For this project, you’ll need to set the min and max number that your dice can produce. For the average die, that means a minimum of 1 and a maximum of 6. You’ll also want a function that randomly grabs a number within that range and prints it.

Concepts to keep in mind:

  • Random
  • Integer
  • Print
  • While Loops

A good project for beginners, this project will help establish a solid foundation for basic concepts. And if you already have programming experience, chances are that the concepts used in this project aren’t completely foreign to you. Print, for example, is similar to Javascript’s console.log.

Thoughts

I actually did a GUI using Tkinter, so I didn't need to use the while loop or ask the user if they want to roll again.

DiceRolla gif

Links

About

Like the title suggests, this project involves writing a program that simulates rolling dice. When the program runs, it will randomly choose a number between 1 and 6. (Or whatever other integer you prefer — the number of sides on the die is up to you.) The program will print what that number is. It should then ask you if you’d like to roll again

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages