You are on page 1of 20

COMPUTER COPY

Wajahat rafaqat
Note’s
unit 3.1
Make a simple calculator
Test
(1) What are 4 arithmetic operators?
Ans: - Operators are symbols and term’s used in
programming. Operators are used to change values 4
arithmetic operator are i + ii - iii * iv /

(2) What is an interface?


Ans:- Every program has an interface. The interface is
how the user interacts with the program. The interface
allows the user to enter the input.
(3) An algorithm sets out the inputs and outputs of a
program. What else does it set out ?
Ans An algorithm give input , output and set of
instruction’s value

(4) When u make a scratch program, what is purpose of


the ‘Event block?
Ans Without event blocks, the script can't run. These
blocks set a triggering moment( For example, Clicking the
green flag) that enables the program to run.
Unit 3.2
Input and output in python
(1) Explain how error message help you to be a
good programmer …..

Ans If u make a mistake an error message’s appear


in python shell’s . and error message’s help us to find
the mistake .error message’s tell that where’s a mistake
is then you can type a program again without including
any mistake.
Unit 3.3
Make a python program
(i) What is advantage of making a program file
instead of typing in the python shell?
Ans The basic Advantage of making a program file is we
can use it again and save it .

(ii) name two different colors used in the python


program file window name the type of program content
Ans a , black for variable and symbol
B, green for string’s
iii) explain 2 different ways you can find error msg in
python program
ANS:- by text color , by the help of error message.

(iv) Describe two difference between IDE for scratch and


IDE for python .
ANS :- (i) IDE for scratch is block base
(i) IDE for python is text base
Unit 3.4 :-
Add two numbers
Qno 1
v

You might also like