Random Module

Qus. 1 : <p>What will be the output of the following Python expression?</p> <pre><span class="kw2" style="font-family: Consolas, Monaco, " lucida="" console",="" monospace;="" text-align:="" justify;="" overflow:="" visible;="" padding:="" 0px;="" border:="" box-shadow:="" none;="" background-image:="" initial;="" background-position:="" background-size:="" background-repeat:="" background-attachment:="" background-origin:="" background-clip:="" overflow-wrap:="" normal;="" color:="" green;="" margin:="" 0px="" !important;="" line-height:="" 20px="" !important;"="">print(round</span><span class="br0" style="font-family: Consolas, Monaco, " lucida="" console",="" monospace;="" text-align:="" justify;="" overflow:="" visible;="" padding:="" 0px;="" border:="" box-shadow:="" none;="" background-image:="" initial;="" background-position:="" background-size:="" background-repeat:="" background-attachment:="" background-origin:="" background-clip:="" overflow-wrap:="" normal;="" margin:="" 0px="" !important;="" line-height:="" 20px="" !important;"="">(</span><span class="nu0" style="font-family: Consolas, Monaco, " lucida="" console",="" monospace;="" text-align:="" justify;="" overflow:="" visible;="" padding:="" 0px;="" border:="" box-shadow:="" none;="" background-image:="" initial;="" background-position:="" background-size:="" background-repeat:="" background-attachment:="" background-origin:="" background-clip:="" overflow-wrap:="" normal;="" color:="" rgb(255,="" 69,="" 0);="" margin:="" 0px="" !important;="" line-height:="" 20px="" !important;"="">4.576</span><span class="br0" style="font-family: Consolas, Monaco, " lucida="" console",="" monospace;="" text-align:="" justify;="" overflow:="" visible;="" padding:="" 0px;="" border:="" box-shadow:="" none;="" background-image:="" initial;="" background-position:="" background-size:="" background-repeat:="" background-attachment:="" background-origin:="" background-clip:="" overflow-wrap:="" normal;="" margin:="" 0px="" !important;="" line-height:="" 20px="" !important;"="">))</span></pre>

  1. 4.5
  2. 5
  3. 4
  4. 4.6
Qus. 2 : random.shuffle() function shuffle value of

  1. take a sequence, like a list, and arrange the items in ascending order
  2. take a sequence, like a list, and reorganize the order of the items.
  3. take a sequence, like a list, and arrange the items in descending
  4. take a sequence, like a list, and return the same copy of sequence

Programs

python program to generate 3 random integers between 100 and 999 which is divisible by 5

View Solution


python program to generate 6 digit random secure OTP between 100000 to 999999

View Solution


python program to generate 6 random numbers and then print their mean median and mode

View Solution


python program to print the calendar of given month and year

View Solution


python program to print the calendar of given year

View Solution


CCC Online Test Python Programming Tutorials Best Computer Training Institute in Prayagraj (Allahabad) Online Exam Quiz O Level NIELIT Study material and Quiz Bank SSC Railway TET UPTET Question Bank career counselling in allahabad Best Website and Software Company in Allahabad Website development Company in Allahabad