Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
71 views

The Joy of Computing Using Python - Unit 6 - Week 4

Uploaded by

muzzammil4422
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)
71 views

The Joy of Computing Using Python - Unit 6 - Week 4

Uploaded by

muzzammil4422
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
You are on page 1/ 5

9/14/23, 5:22 PM The Joy Of Computing Using Python - - Unit 6 - week 4

(https://swayam.gov.in) (https://swayam.gov.in/nc_details/NPTEL)

adnanainul99@gmail.com 

NPTEL (https://swayam.gov.in/explorer?ncCode=NPTEL) » The Joy Of Computing Using Python

(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.

If already Due on 2023-08-23, 23:59 IST.


registered, click
to check your Assignment submitted on 2023-08-23, 23:14 IST
payment status
1) What is a magic square? 1 point

A square grid of letters

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

Week 3 () Yes, the answer is correct.


Score: 1
Accepted Answers:
week 4 ()
15
Practice is the
key (unit? 3) Which of the following is NOT a property of a magic square? 1 point

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

unit=78&lesso The sum of each row is equal


n=79)
The sum of each column is equal
Magic Square:
The sum of each diagonal is equal
Hit and Trial
01 (unit? The sum of each individual element is equal
unit=78&lesso Yes, the answer is correct.
n=80) Score: 1
Accepted Answers:
Magic Square:
The sum of each individual element is equal
Hit and Trial
02 (unit? 4) What will be the output of the following code? 0 points
unit=78&lesso
n=81)

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

Download 8) Which module is used to generate random numbers in Python? 1 point


Videos ()

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

9) Which function is used to shuffle a list in Python? 1 point

random.shuffle()
shuffle()
list.shuffle()
random_list()
Yes, the answer is correct.
Score: 1
Accepted Answers:
random.shuffle()

10) What is the output of the following code? 1 point

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

Yes, the answer is correct.


Score: 1
Accepted Answers:
A random ordering of the numbers 1 through 5

https://onlinecourses.nptel.ac.in/noc23_cs108/unit?unit=78&assessment=343 5/5

You might also like