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>
- 4.5
- 5
- 4
- 4.6
- Error
- Either 3 or 4
- Any integer other than 3 and 4
- Any decimal value between 3 and 4
- 10
- 18
- 79
- 95
- 32
- 67
- 91
- 80
- error
- do nothing, it is a placeholder for a function that is yet to be implemented
- shuffle the elements of the list in-place
- none of the mentioned
- random
- randrange
- randomrange
- rand
- take a sequence, like a list, and arrange the items in ascending order
- take a sequence, like a list, and reorganize the order of the items.
- take a sequence, like a list, and arrange the items in descending
- 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
python program to generate 6 digit random secure OTP between 100000 to 999999
python program to generate 6 random numbers and then print their mean median and mode
python program to print the calendar of given month and year
python program to print the calendar of given year
Write a function that prints the current date and time in a formatted way ("Year-Month-Day Hour : Minute)