You are on page 1of 17

The City School

Bahawalpur Campus

ICTECH Computing
Workbook
Class- 7
Programming the Computer (Python)
Q: Circle the correct option.

1. Is Python case sensitive when dealing with identifiers?

a. yes
b. no
c. machine dependent
d. None of above

2. Select all options that print. Hello-how-are-you

a. print(‘hello’,‘how’,‘are’,‘you’)
b. print(‘hello’,‘how’,‘are’,‘you’+‘-‘*4)
c. print(‘hello-‘‘how-are-you’)
d. print(‘hello’ + ‘-‘ + ‘how’ + ‘-‘ + ‘are’ + ‘you’)

3. Which of the following is the correct extension of the Python file?

a. .python
b. .pl
c. .py
d. .p

4. What is correct way of assigning the string value of a variable?

a. x=”orange”
b. x==orange
c. x,orange

5. Which of the following is true for variable names in Python?

a. underscore and ampersand are the only two special characters allowed
b. unlimited length
c. all private members must have leading and trailing underscores
d. none of the mentioned
6. How do you insert COMMENTS in Python code?
a. //This is a comment
b. /*This is a comment*/
c. #This is a comment
d. None of these
7. The program is embedded inside a hardware device it’s called ___________________.

a) Firmware b) Software c) Hardware d) none


7. Which key help to RUN modules in python?

a) F2 b) F3 c) F4 d) F5

8. Which of the following is used to define a block of code in Python language?

a) Brackets b) Indentation c) Key d) all

9. The _________ knows how to write a code.


a) Programmer b) coder c) both a and b d) admin

Q: Fill in the blanks.

a. ____________ can be presented by natural languages, pseudocode and flowchart.

b. Hardware is a term we use to describe the ____________ and _______ parts of the coputer.

c. A _______ is just an ordered of collection items which can be of any data type.

d. ___________ are used for the purpose of in-code documentation.

e. _______________ is a programming conditional statement that, if proved true, performs a

function or displays information.

Q: True False.

a. As per Code.org there are over 400,00 opening for computing jobs in the
USA. __________
b. A Tkinter application runs most of its time inside an event loop. _______
c. A flow chart is a type of description. _________
d. Syntax errors in typing the text.__________
e. Data Flow Diagram short form is DDF. __________
Q: Match the column A with Column B.

Column A Column B

Arrows/Connectors

Input/output

Decision

process

Start/end

Q: What is Flowchart?.

___________________________________________________________________

___________________________________________________________________
___________________________________________________________________

Q: What is an Algorithm?

___________________________________________________________________

___________________________________________________________________

___________________________________________________________________

Q: Define Pseudocode?

___________________________________________________________________

___________________________________________________________________

Q: What is Program??

___________________________________________________________________

___________________________________________________________________
Q: Write famous python websites where we can use python language?

___________________________________________________________________

___________________________________________________________________

Q: What is python variables and rules for declaring python variable?

___________________________________________________________________

___________________________________________________________________

Q: What are the benefits of using Python? (Write any 2)

___________________________________________________________________

__________________________________________________________________

Q: What is a correct syntax to output "Hello World" in Python?

___________________________________________________________________

Q: Define IDLE.

___________________________________________________________________

___________________________________________________________________

Q: Draw and describe any 2 shapes of flowchart.

___________________________________________________________________

___________________________________________________________________

Q: Write two advantages of using algorithms.

___________________________________________________________________

___________________________________________________________________
Q: Define the difference between Programming Language and Scripting Language.
___________________________________________________________________

___________________________________________________________________

___________________________________________________________________

Take hours and rate of per hour as input and Fill in the blanks of the flowchart below in order
to calculate the salary of the employee.

Get Dividend

Divide by
Robotics
Q: Circle the correct option.

A. To start moving the robot you first have:


 To press the play button
 To set the correct properties
 To choose an icon
 To make a program
B. To make the robot to repeat some action
 You have to press the record button.
 You need to use the loop icon.
 You need to use the if icon.
 It has to meet an obstacle.

C. When the robot detects an obstacle:


 It depends from the settings of the IF icon.
 It will move forward.
 It will move left.
 It will stop.

D. To end the program:


 You have to press the button stop.
 you have to choose the loop end icon.
 The last icon that you have to see in the programming area is “end”.
 You have to choose to choose event wait icon.

Q: Circle the correct option.


1. The science and technology of robots is called___________.
a. Robotics
b. Edware
c. Edison
2. _______ defined the “The Three Laws of Robotics”..
a. Adrial Asimov
b. Isaac Asimov
c. Kenric Asimov
3. Edison can be programmed using ______ different types of programming
languages.
a. Three
b. Two
c. One
d.
4. There are ________ kinds of issues with robots to be considered.
a. Two
b. One
c. Three
5. _____ is a text-based programming language based on Python.
a. Edware
b. Edblocks
c. Edpy

Q: Fill in the blanks.

a. Edison robot are a complete ______________ designed to bring coding to life.

b. The Most Important electronic part is _______________.

c. The _______ loop often goes together with the range () function in Python.

d. We can check the program for errors with the ______________.

e. Edison have _______ buttons.

Q: What are the three Laws of Robotics?

1. _________________________________________

2. _________________________________________

3. _________________________________________
Q: True False.

1. Put a  if the sentence is correct

1. Edison is a programmable robot which is suited only for complex processes. 


2. Edscratch is a programming language which combines the drag-and- drop icons with text-based entry. 
3. With the record button starts the execution of the program. 
4. Edison has 3 hardware buttons and it is also equipped with different sensors in order to understand its

environment. 
5. By pressing the record button starts the execution of the program. 
6. With the stop button the program stops. 
7. Any program you create in Edscratch must be downloaded to Edison before the robot can perform the

actions. 
8. To download a program to Edison you just need a WIFI connection. 
9. Edscratch uses icons that represent programming commands which control the actions of the robot. 
10. There are five categories of icons in the icon palette. 
11. The control icons do math on a variable. 
12. The flow icons control the flow of the program. 
13. Before you download the program to the robot the volume of your computer should be at the minimum.


14. When Edison finishes downloading will make a distinctive sound. 
15. When you click Program Edison the program starts downloading. 
16. The robot can play a tune string that you can create. 
1. Put a  if the sentence is correct

17. Edison has two motors that allow it to perform several movements. 
18. The two motors make the robot move only forward. 
19. The dual drive icon controls the time of the movement of the robot’s two motors. 
20. Using EdScratch you can create programs that combines all the movements


Edison can perform.

21. You can set parameters for each icon to see how the robot will react to its


sensors.

22. To set the parameters for each icon you have to open the properties of each one. 
23. With the loop start icon the program is set to run forever until you press the stop


button on the robot.

24. The loop end button ends the program. 


25. You don’t need to set something on the loop start properties. 
26. When you put the loop start icon on the programming area it’s not necessary to


put the loop end icon too.

27. The light in the robot flash once every second. 


28. After creating a program on EdScratch you have to download it to the robot. 
29. The loop start icon runs over and over again the program. 
Q: Match the column A with column B and write the answer in column C..

Column A Column B Column C

Barcode and

Remote Control Python programming Interface

EdBlock Scratch Language Interface

EdScratch Light sensor

Edpy

Ed.PlayTone() Play musical notes

A Phototransistor Graphical Language

Q: Enlist the parts of EDPY interface.

________________________________________________________________________________

________________________________________________________________________________

________________________________________________________________________________

Q: Define Ed. Drive Direction Parameters.

________________________________________________________________________________

________________________________________________________________________________

________________________________________________________________________________

Q: How many types of loops structures can be used in Edison.


Define each type of loop?

________________________________________________________________________________

________________________________________________________________________________

________________________________________________________________________________
Q: Why do we need to declare variables in Python?

________________________________________________________________________________

________________________________________________________________________________

________________________________________________________________________________

Q: Describe the function of EdComm cable.

________________________________________________________________________________

________________________________________________________________________________

________________________________________________________________________________

Q: How can the sound sensor work in Edison?

________________________________________________________________________________

________________________________________________________________________________

________________________________________________________________________________

Q: Write down two parameters of Ed.Drive Direction parameters?

___________________________________________________________________________

___________________________________________________________________________

___________________________________________________________________________
Q: Differentiate between For and While loop.

___________________________________________________________________________

___________________________________________________________________________
___________________________________________________________________________
Q: How does Edison’s Line Tracking sensor work?

___________________________________________________________________________

___________________________________________________________________________

___________________________________________________________________________
Q: Write down the function of the following:

i. While loop

_______________________________________________________________________________

ii. Variables

_______________________________________________________________________________

iii. For loop

_______________________________________________________________________________

iv. If statement

_____________________________________________________________________________

Fill in the gaps with the appropriate words


Record button – Line tracking sensor – Stop button – Light sensors
Play button – On/Off button

…………………………………
…………………………………

…………………………………
…………………………………

……………………………………

……………………………………
Number the pictures from 1-5 to indicate the correct order of the steps that
you must follow to download a program to the robot.
Press the record button

once □
Slide the power switch to


the ON position

Press the play button to


start the program

Connect the EdComm cable


to the headphone socket on
the computer and turn up
the volume to full


Press the buttons “Program
Edison” and “Start
Download”
Q: Label the diagram.

1. __________________________

2. __________________________

3. __________________________

4. __________________________

5. __________________________

6. __________________________
7. __________________________

8. __________________________

9. __________________________
Mobile App Development
Q: Fill in the blanks.

1. The _______________ block changes the look of the elements on your screen.
______________ have lots of propertiesnyou can change like their text colour,
Background colour or font size.
2. Events are ______________ like clicking a button etc.
3. To add events in App Lab you need to use a new block called __________.
4. The ________________ block allows you to need to add sound to your app.

Q: True False.
a. To add images to your elements you can just use the setProperty () block. ___________
b. The setProperty () block changes the look of the events on your screen.____________

Q: Explain the purpose of design elements found in the design toolbox .

___________________________________________________________________

___________________________________________________________________

___________________________________________________________________

Q: How to add images and icons to the app?

___________________________________________________________________

___________________________________________________________________

___________________________________________________________________

Q: Define the function of setPropert() Block?

___________________________________________________________________

___________________________________________________________________

___________________________________________________________________
Q: Define the term Event Handling?

___________________________________________________________________

___________________________________________________________________

Q: How to desin an app in App lap?

___________________________________________________________________

___________________________________________________________________

___________________________________________________________________

Q: 3. Label the picture.

You might also like