The Joy of Computing Using Python - Unit 6 - Week 4
The Joy of Computing Using Python - Unit 6 - Week 4
(https://swayam.gov.in) (https://swayam.gov.in/nc_details/NPTEL)
adnanainul99@gmail.com
(course)
Click to register
for Certification
exam
Week 4 : Assignment
(https://examform.nptel.ac.in/2023_10/exam_form/dashboard)
The due date for submitting this assignment has passed.
Course A square grid of numbers where the sum of the rows, columns, & diagonals are equal
outline A special kind of card trick
A term used in cryptography
How does an Yes, the answer is correct.
NPTEL Score: 1
online Accepted Answers:
course A square grid of numbers where the sum of the rows, columns, & diagonals are equal
work? ()
2) In a 3x3 magic square, what is the magic constant? 1 point
Week 0 ()
3
Week 1 () 6
9
Week 2 ()
15
https://onlinecourses.nptel.ac.in/noc23_cs108/unit?unit=78&assessment=343 1/5
9/14/23, 5:22 PM The Joy Of Computing Using Python - - Unit 6 - week 4
Magic Square:
Hit and Trial
03 (unit?
unit=78&lesso
n=82)
Magic Square:
Hit and Trial
04 (unit?
unit=78&lesso
n=83)
Magic Square:
Hit and Trial
05 (unit?
unit=78&lesso
n=84)
Let's program
and play (unit?
unit=78&lesso
n=85)
A magic square of size 2.
Dobble Game
- Spot the A magic square of size n.
similarity 01 A magic square of an even size.
(unit?
A magic square of an odd size.
unit=78&lesso
n=86) No, the answer is incorrect.
Score: 0
Dobble Game Accepted Answers:
- Spot the A magic square of size n.
similarity 02
(unit?
5) What will be the output of the following code? 1 point
unit=78&lesso
n=87)
Dobble Game
- Spot the
similarity 03
(unit?
unit=78&lesso
n=88)
https://onlinecourses.nptel.ac.in/noc23_cs108/unit?unit=78&assessment=343 2/5
9/14/23, 5:22 PM The Joy Of Computing Using Python - - Unit 6 - week 4
Dobble Game
- Spot the
similarity 04
(unit?
unit=78&lesso
n=89)
What is your
date of birth?
(unit?
unit=78&lesso
n=90)
Birthday
Paradox - Find Sorted List(L) containing random elements between 0-10 in descending order.
your twin 01
Sorted List containing random elements between 0-10 in ascending order.
(unit?
unit=78&lesso Sorted List containing elements between 0-10.
n=91) Sorted List containing elements between 0-9 in ascending order.
Birthday Yes, the answer is correct.
Paradox - Find Score: 1
your twin 02 Accepted Answers:
(unit? Sorted List(L) containing random elements between 0-10 in descending order.
unit=78&lesso
n=92)
6) Which code will generate all prime numbers between 0-100? 1 point
Birthday
Paradox - Find
your twin 03
(unit?
unit=78&lesso
n=93)
Birthday
Paradox - Find
your twin 04
(unit?
unit=78&lesso
n=94)
Birthday
Paradox - Find
your twin 05
(unit?
unit=78&lesso
n=95)
What's your
favourite
movie? (unit?
unit=78&lesso
n=96)
Guess the
Movie Name
01 (unit?
unit=78&lesso
n=97)
https://onlinecourses.nptel.ac.in/noc23_cs108/unit?unit=78&assessment=343 3/5
9/14/23, 5:22 PM The Joy Of Computing Using Python - - Unit 6 - week 4
Guess the
Movie Name
02 (unit?
unit=78&lesso
n=98)
Guess the
Movie Name
03 (unit?
unit=78&lesso
n=99)
Guess the
Movie Name
04 (unit?
unit=78&lesso
n=100)
Guess the
Movie Name
05 (unit?
unit=78&lesso
n=101)
Guess the
Movie Name
Yes, the answer is correct.
06 (unit?
Score: 1
unit=78&lesso
Accepted Answers:
n=102)
Week 4
Feedback
Form: The Joy
of Computing
using Python
(unit?
unit=78&lesso
n=103)
Quiz: Week 4
: Assignment
(assessment?
name=343)
7) In the birthday paradox, as the number of people in a group increases, what 1 point
Week 5 () happens to the probability that two people share a birthday?
It increases
Week 6 ()
It decreases
Week 7 () It stays the same
It becomes impossible
Week 8 ()
Yes, the answer is correct.
Score: 1
Text Accepted Answers:
Transcripts () It increases
https://onlinecourses.nptel.ac.in/noc23_cs108/unit?unit=78&assessment=343 4/5
9/14/23, 5:22 PM The Joy Of Computing Using Python - - Unit 6 - week 4
Books () math
random
Problem stats
Solving
numpy
Session -
July 2023 () Yes, the answer is correct.
Score: 1
Accepted Answers:
random
random.shuffle()
shuffle()
list.shuffle()
random_list()
Yes, the answer is correct.
Score: 1
Accepted Answers:
random.shuffle()
import random
nums = [1, 2, 3, 4, 5]
random.shuffle(nums)
print(nums)
[1, 2, 3, 4, 5]
[5, 4, 3, 2, 1]
A random ordering of the numbers 1 through 5
An error
https://onlinecourses.nptel.ac.in/noc23_cs108/unit?unit=78&assessment=343 5/5