Lab Task 12 Random
Lab Task 12 Random
12
Lab 12 – Introduction
Exercise:
Q.1 Create a list of different Cities of Pakistan and by using random module Shuffle that list.
CODE:
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.
CODE:
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
CODE:
OUTPUT: