0% found this document useful (0 votes)
10 views7 pages

Zara Python

The document outlines a Python programming lab project by Zara Adeen Khadeer, focusing on simulating the rolling of a 6-sided dice using the random module. It explains the purpose of the program, key concepts such as the while loop and user interaction, and the tools used, specifically Python and its random library. The program allows users to roll the dice multiple times until they choose to stop by typing 'no'.

Uploaded by

amreenshifa319
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views7 pages

Zara Python

The document outlines a Python programming lab project by Zara Adeen Khadeer, focusing on simulating the rolling of a 6-sided dice using the random module. It explains the purpose of the program, key concepts such as the while loop and user interaction, and the tools used, specifically Python and its random library. The program allows users to roll the dice multiple times until they choose to stop by typing 'no'.

Uploaded by

amreenshifa319
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 7

SHADAN WOMEN’S COLLEGE OF ENGINEERING AND

TECHNOLOGY

NAME :ZARA ADEEN KHADEER


BRANCH/SEC: CSE-C
HTNO.: 24L51A05I7
SUBJECT: PYTHON PROGRAMMING LAB
HANDLED BY: MS SAFIYA
EXPLANATION
• Purpose: To simulate the rolling of a 6-sided
dice.
• random.randint(1, 6) generates a random number
between 1 and 6.
• The while loop lets the user roll again as many
times as they want.
• The program stops when the user types “no”.
TOOLS AND LIBRARIES
USED
Programming Language:
1.Python – A high-level, beginner-friendly programming
language.

2. Library Used:
• random module – A built-in Python library used to
generate random numbers.
Function used: random.randint(1, 6) to
simulate a dice roll.
KEY CONCEPTS

• import random – loads Python’s random


number generator.
• while loop – repeats actions until user says
“no”.
• input() – lets the user interact with the
program.
• print() – shows the dice result.
PROGRAM
OUTPUT
THANK YOU

You might also like