The Joy of Computing Using Python | Week 1

Session: JAN-APR 2024

Course Name:  The Joy of Computing using Python

Course Link: Click Here

For answers or latest updates join our telegram channel: Click here to join

These are the Joy of Computing using Python Assignment 1 Answers


Q1. Which of the following best defines a variable in programming?
A constant value that cannot be changed during program execution.
A named storage location that can hold varying data during program execution.
An operation that performs arithmetic calculations on data.
A reserved word is used to define a function or method in a program.

Answer: A named storage location that can hold varying data during program execution.


Q2. Humans easily get bored doing a repetitive job. However, computers are masters of iteration. In programming, we get a control structure that allows a set of instructions to be executed repeatedly based on a condition. It enables automating repetitive tasks by iterating through a block of code until a specific condition is met or for a defined number of times. What is this control structure called?
Variable
Operator
Loop
Data Type

Answer: Loop


Q3. Programming logic is different from programming language. Programming languages are many, but programming logic almost remains the same across all programming languages. Which of the following is programming logic?
Python
C
C++
None of the above

Answer: None of the above


For answers or latest updates join our telegram channel: Click here to join

These are the Joy of Computing using Python Assignment 1 Answers


Q4. Open-source software, unlike proprietary software, is computer software developed through public, collaborative efforts and made freely available to the public. Which of the following programming languages is/are open source?
Java
Python
FORTRAN
Perl

Answer: Java
Python
FORTRAN
Perl


Q5. Knowing how to write a piece of code could help us get things done fast. Choose the areas where we can implement coding.?
Physics
Mathematics
Economics
Small Scale Business

Answer: Physics
Mathematics
Economics Small
Scale Business


Q6. The block of code displayed here is meant for the cat, what is the functionality of this code?
It brings the ball closer to the cat.
It makes the cat appear like kicking the ball.
It makes the cat tumble and rotate
The code throws an error.

Answer: It brings the ball closer to the cat.


For answers or latest updates join our telegram channel: Click here to join

These are the Joy of Computing using Python Assignment 1 Answers


Q7. The block of code displayed here makes the cat rotate out of impact from the boomeranging ball, how many complete rotations does the cat make?
One
Two
Three
Four

Answer: Three


Q8. The block of code displayed here makes the cat rotate out of impact from the boomeranging ball, how many loops are there in total?
One
Two
Three
Four

See also  The Joy of Computing using Python | Week 10

Answer: Two


Q9. The block of code displayed here is meant for the ball, how many loops are there in total?
One
Two
Three
Four

Answer: One


These are the Joy of Computing using Python Assignment 1 Answers


Q10. The block of code displayed here is meant for the ball, if the value beside repeat would have been 1 instead of 2, Select all the statements that explain the situation.
The Ball would not have returned to Cat.
Removing the loop from the code would have made no difference in the result.
The Ball would not have left its original position.
The code would throw an error

Answer: The Ball would not have returned to Cat
Removing the loop from the code would have made no difference in the result.


For answers or latest updates join our telegram channel: Click here to join

These are the Joy of Computing using Python Assignment 1 Answers

More Weeks of The Joy of Computing Using Python: Click here

More Nptel Courses: Click here


Session: JULY-DEC 2023

Course Name:  The Joy of Computing using Python

Course Link: Click Here

These are the Joy of Computing using Python Assignment 1 Answers


Q1. What will be the value of my variable at the end of the loop.
50
40
49
0

Answer: 40


Q2. Which of the following is not a type of block in Scratch?
Motion
Looks
Sound
Jump

Answer: Jump


Q3. What is the main function of the “if” block in Scratch?
To repeat a set of instructions
To create a loop
To control the flow of the program based on a condition
To play a sound

Answer: To control the flow of the program based on a condition


These are the Joy of Computing using Python Assignment 1 Answers


Q4. Which block in Scratch is used to control the movement of a sprite?
Motion
Looks
Sound
Control

Answer: Motion


Q5. Imagine sprite to be a scooter. How many times scooter will move forward?
7
4
6
5

Answer: 5


Q6. Which block in Scratch is used to make a sprite say something?
Motion
Looks
Sound
Control

Answer: Looks


These are the Joy of Computing using Python Assignment 1 Answers


Q7. What is the purpose of the “repeat” block in Scratch?
To repeat a set of instructions a specific number of times
To repeat a set of instructions forever
To repeat a set of instructions based on a condition
To play a sound repeatedly

Answer: To repeat a set of instructions a specific number of times


Q8. Which block in Scratch is used to wait for a certain amount of time before continuing with the program?
Motion
Looks
Sound
Control

Answer: Control

See also  The Joy of Computing using Python | Week 6

Q9. Which block in Scratch is used to detect when a sprite touches another sprite?
Motion
Looks
Sound
Sensing

Answer: Sensing


These are the Joy of Computing using Python Assignment 1 Answers


Q10. What is the purpose of the “broadcast” block in Scratch?
To send a message to another sprite
To play a sound
To move a sprite
To change the background color

Answer: To send a message to another sprite


These are the Joy of Computing using Python Assignment 1 Answers

More Weeks of The Joy of Computing Using Python: Click here

More Nptel Courses: Click here


Session: JAN-APR 2023

Course Name:  The Joy of Computing using Python

Course Link: Click Here

These are the Joy of Computing using Python Assignment 1 Answers


Q1. Which of the following is/are control commands in Scratch?
a. repeat
b. repeat until
c. forever
d. forever until

Answer: a, b, c


Q2) Which option in scratch is used to wait between the commands:
a. Event
b. Sensing
c. Control
d. Operators

Answer: c. Control


Q3) ________ command is used to make the sprite walk by certain steps.
a. Hide
b. Delete
c. Move
d. Walk

Answer: c. Move


These are the Joy of Computing using Python Assignment 1 Answers


Q4) The command used to make the sprite disappear from the animation stage is ________.
a. Show
b. Hide
c. Delete
d. move

Answer: b. Hide


Q5) What is the extension of a scratch file?
a. py
b. Se
c. Sb
d. sc

Answer: c. Sb


Q6) Predict the output of the following:
a. 0
b. 100
c. 20
d. None of the above

Answer: d. None of the above


These are the Joy of Computing using Python Assignment 1 Answers


Q7) Which of the following is a facility provided by scratch to use sound effects?
a. A sound library is provided
b. Sound can be recorded using a microphone
c. We can use sound file
d. None of the above
e. All of the above are correct (except 4).

Answer: e. All of the above are correct (except 4).


Q8) In addition to an option of using the inbuilt sprite library in scratch, what are the other ways to use a sprite?
a. We can paint a custom sprite
b. We can use the camera to take pictures
c. We can upload an image from our computer
d. All of the above

Answer: d. All of the above


Q9) _______ scratch constructs are used to keep doing a set of instructions infinitely?
a. ever
b. forever
c. never
d. None of the above

Answer: b. forever


These are the Joy of Computing using Python Assignment 1 Answers


Q10) Which of the following commands would make the sprite move backward?
a. Move 10 steps
b. Move -10 steps
c. Both 1 and 2
d. Neither 1 and 2

See also  The Joy of Computing using Python | Week 3

Answer: b. Move -10 steps


Session: JULY-DEC 2022

Course name: The Joy of Computing Using Python

These are the Joy of Computing using Python Assignment 1 Answers

1. What are the functions that can be performed on the variables?
a. Rename
b. Delete
c. initialize starting value
d. All of the above

Answer: d


2. Which of the following statements is true?
a. One can run an infinite loop.
b. One cannot change the value of a variable.
c. One cannot add sound in scratch.
d. One cannot change the size of the image.

Answer: a


3. Choose the odd one out.
a. If
b. Repeat
c. hide
d. Wait

Answer: c


4. Which command can be used to decrease the size of a sprite?
a. Set size by
b. Change size by
c. Decrease size
d. Size change by

Answer: a


5. Which command can be used to move an object by some steps?
a. rotate
b. turn
c. move
d. forward

Answer: c


These are the Joy of Computing using Python Assignment 1 Answers


6. What does the cat say after executing the following code?

a. All-natural numbers between 1-20. (Both inclusive)

b. All even numbers between 1-20. (Both inclusive)

c. All odd numbers between 1-20. (Both inclusive)

d. All whole numbers between 0-20. (Both inclusive)

Answer: b


7. Which of the following command is not related to the motion section?
a. if
b. wait
c. move
d. rotate

Answer: b


These are the Joy of Computing using Python Assignment 1 Answers


8. Which command can be used to make an image reappear?
a. hide
b. reappear
c. show
d. glide

Answer: c


9. Which of the following command is used to take the absolute value of a number?
a. absolute of
b. abs of
c. mod of
d. modulus of

Answer: b


10. State True or False: In scratch one can mention x and y coordinates to move an image.
a. True
b. False

Answer: a


These are the Joy of Computing using Python Assignment 1 Answers

More Weeks of The Joy of Computing Using Python: Click here

More Nptel Courses: Click here


These are the Joy of Computing using Python Assignment 1 Answers