Bav-Informatics-Practices Test 01

You might also like

Download as pdf
Download as pdf
You are on page 1of 3
Bhavan's Adarsha Vidyalaya, Kakkanad Total marks :10 Informatics Practices (Revision Test1) Time: 20 minutes 1. Write a Python program that accepts the radius of a circle and print its area. 2) Ans: v= float(input(“enter radius”) a= (22I7)"r"2 print(* the area =",a) 2. Give the output: print(X.¥, sep="##") Ans: 15 13422 3. White a Python program that accepts a number and print its first $ multiples in separate lines... (2) Ans: ne int(input(enter a numbe aen't print) aen'2 print(a) aen"3 print) 4. Differentiate between the following with an example for each: a) Keyword and identifier @ Ans: keywords are predefined reserved words, which possess special meaning. Eg:intfloat identifier is a unique name given to a particular variable, function or label of class in the Program Eg:number, alphabet b) Interactive made and script mode. @) Ans: Interactive mode is used when an user wants to run one single line or one block of code. It runs very quickly and gives the output instantly. Script Mode Is used when the user Is working with more than one single code or a block of code. 5. Find the error in the following program. a) A=3 S=A+10 ‘A="New" a=A10 Ans: syntax error ‘Str and int cannot be divided Print ("X=", X) Ans: syntax error y=x Is not the correct way to write x=y Is the correct way (1x2=2)

You might also like