0% found this document useful (0 votes)
2 views4 pages

Python Random Module Lab Exercises

The document outlines a lab task involving the use of the random module in Python. It includes three exercises: shuffling a list of cities in Pakistan, managing a list of scholarship applicants, and simulating a dice game for two players. Each exercise requires specific operations with lists and the random module.

Uploaded by

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

Python Random Module Lab Exercises

The document outlines a lab task involving the use of the random module in Python. It includes three exercises: shuffling a list of cities in Pakistan, managing a list of scholarship applicants, and simulating a dice game for two players. Each exercise requires specific operations with lists and the random module.

Uploaded by

huzaifaa.ayyazz
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

RANDOM MODULE LAB TASK:

EXERCISE:

Q.1 Create a list of different Cities of Pakistan and by using


random module Shuffle that list.

OUTPUT:

Q.2 Define a list, consisting of names


of different students, who are applying
for a scholarship, pop an item from that
list and transfer all items in a new list
and apply sample method of random
module to give scholarship to two
students of new list.
OUTPUT:

Q.3 Define two lists dice1 and dice2, holding


numbers from 1 to 6 ,Design a python program that
start playing with two dices for two players
OUTPUT:

You might also like