You are on page 1of 5

COMPUTER SCIENCE - FIRST TERM ASSIGNMENT CLASS V (2013-2014) Answers

Q 1 S!"!e Tr#e $r F"%se
1. In QBASIC, CLS command is used to clear the output screen. Tr#e 2. PRINT 2!"#$% displa&s 2!"#$. Tr#e ". Input de'ice is used to displa& the processed in(ormation. F"%se ). SCR**N 1 has $)+ columns and 2++ ro,s. F"%se -. In LIN* command B is used to dra, a .o/. Tr#e $. 0ard dis1 is a secondar& stora2e de'ice. 3. All the Input and 4utput de'ices are attached to the S&stem unit. 5. In QBASIC, line num.ers that ,e 2i'e should .e ,hole num.ers. Tr#e 6. In QBASIC, output ,ill .e ,ithout 2ap ,hen ,ords are seperated .& comma7,8. F"%se 1+. In QBASIC, LIN* command is used to dra, a line or a .o/ (rom the speci(ied position. Tr#e Tr#e Tr#e

Q 2 F&%% &n !'e (%"n)s
1. In QBASIC, the (i2ures are dra,n in 2raphics ,ith an in'isi.le *+$&n!er** 2. In QBASIC, 9RA: 0-+% command will draw a line in upward direction towards the
left side.

". *In+#!** de'ice is used to (eed data into a computer. ). In QBASIC, SCR**N 2 is called **'&,'** resolution 2raphic mode.
Pa2e 1 o( -

:rite the e/amples o( Primar& and Secondar& Stora2e de'ice. This command is used to chan2e the resolutions o( the screen i. as SCR**N 2 2raphics are onl& in .e (ollo.hite. :hat is an Interpreter. :rite the (unction o( a C4L4R command. Q 3 Answer !'e . Stora2e Bnit and 4utput Bnit. An Interpeter is a computer pro2ram that e/ecutes instructions . The rule that . Ans. Ans. direction steps% -. PRINT 1$22"n3 ? Line No. R4A */amples o( Secondar& Stora2e de'cies are @ 0ard 9is1. 5.ritten in a pro2rammin2 lan2ua2e. S/n!"0 ? 9ra. <lopp& 9is1.lac1 and . S/n!"0 ? SCR**N n :here n is the choice o( the mode 7+. :rite the main components o( computer. Ans. Ans. to chan2e the num. :hat is S&nta/.e. The main components o( computer are Input Bnit.s and columns on the screen. 1.-. 2. BASIC = Be2inners> All Purpose S&m. All statements in BASIC must terminate . Ans. Aa2netic tapes 6.er o( ro. :hat is a SCR**N Command. This command is used to chan2e the colour o( te/t and 2raphics.ith the *en!er** 1e&. Ans. S/n!"0 $. to . Ans. 1. */amples o( Primar& Stora2e de'ices are @ RAA.rite the commands and a statement is called S&nta/. Pa2e 2 o( - . Ans. or 28 ). :rite the s&nta/ o( PRINT Statement. 3. Ans. :rite the s&nta/ o( 9RA: command. :rite the (ull (orm o( BASIC. S&stem Bnit. C4B4L and <4RTRAN.$%%$w&n.olic Instruction Code C4B4L ? Common Business 4riented Lan2ua2e <4RTRAN ? <ormula Translation ". This command is used (or SCR**N + and SCR**N 1onl&. PRINT Te/t% $.

o .ill appear on the same line. The de'ices used to (eed data or in(ormation are called Input de'ices. The de'ices on .ith the e/ample.ers are separated .$%%$w&n.een. S&stem Bnit ? Aost parts o( the computer are (ound in a . c. .e 0*LL4<RI*N9S . Pa2e 3 o( - . 1. E0"2+%e= 1+ PRINT %0*LL4%D%<RI*N9S% 2+ *N9 4utput .e 0*LL4 <RI*N9S Se2&1$%$n &n PRINT S!"!e2en!5 I( the .ill .een t.et. In+#! Un&! ? 9ata and in(ormation need to .et.ords or num.e 2i'en to a computer throu2h an INPBT BNIT.o/ called S&stem Bnit. Input and 4utput Bnit. .ithout a 2ap.ers then the output .ill .& semicolon the output . Ans. O#!+#! Un&! ? :hen data or in(ormation is 2i'en to the S&stem Bnit throu2h the input Bnit.hich processed in(ormation is displa&ed are called 4utput de'ices.ill send the data to the s&stem unit. Ans. Scanner etc.ith Conal 2aps in . Ans.hen comma is used . 9e(ine S&stem Bnit. Comma and Semicolon in PRINT statement . DRAW “F40” Will draw a diagonal line by 40 steps in the downward direction towards the right side.eren!&"!e !'e .. 9RA: *)+% and 9RA: <)+% Ans. Fo&stic1. a.oard. Aouse. the processed in(ormation is sent to the 4BTPBT BNIT.1+. Q 4 4&. 2. */amples@ Ee&.%<RI*N9S% 2+ *N9 4utput ..ill .e on the same line. E0"2+%e= 1+ PRINT %0*LL4%. DRAW “E40” Will draw a diagonal line by 40 steps in the upward direction towards the right side. . This unit .ords or num. C$22" &n PRINT S!"!e2en!5 In PRINT statement.

#n SCREEN 2' we can not change the colour o( graphics. */plain CIRCL* command . ".*/amples@ Aonitor.er. Ans.er and a is the ro. num. Ans. #t is a &igh Resolution %raphics $ode. S/n!"0 ? LIN* 7&. num.. B< & is the column num.ords must .ers.ith the s&nta/. / is the ro. SCREEN 2 This screen has "40 colu!ns and 200 rows. r. < is 2i'en . 7a8 Ans. 2.ith the num.ith B to (ill the . #t is a $ediu! Resolution %raphics $ode. Q 6 I3en!&. This screen has 20 colu!ns and 200 rows. a line or a .E0+%"&n &n 3e!"&% 1. */plain LIN* command . C speci(ies the colour.hile 2i'in2 instructions.o/. c & is the column num. 2. CIRCLE 1$22"n3@ CIRCL* 7&. . num. SCREEN 1 and SCREEN 2 SCREEN 1 1. /8 .ritin2 a QBASIC pro2ram.o/ (rom the speci(ied position. All instructions must start .ant to dra. SCR**N 1 and SCR**N 2 command. LINE 1$22"n3 ? This command is used to dra. :rite the rules o( .er. a circle (rom the 2i'en Position as the centre and (or the 2i'en radius. R#%es ? 1. . CIRCL* Command ? This command is used to dra. Q .e used . is the column num. a8./ !'e err$rs "n3 wr&!e !'e 1$rre1! +r$. d. Appropriate BASIC lan2ua2e .hen &ou . /8 ? 7. B is 2i'en .r"2 Pa2e 4 o( - . C.er o( end position. 2. r as the radius o( the circle and c is (or the colour.ith the s&nta/. ".er and / is the ro.e 2i'e to the computer must .er o( startin2 position. All the instructions that . #n SCREEN 1' we can change the colour o( graphics.e in capital letters. a .o/. Printer. Ans. S/n!"0 $.

") 1+. PRINT 1$G) "+. C4L4BR " "+. 9ASIC Pr$. 9RA: B)+%D%9)+% )+ 9RA: *-$% -+ dra. PRINT 6H2# )+ PRINT TABI2+JD Aonitor% -+ PRINT )!" # $!2% $+ PRINT computer 1+ CLS 2+ PRINT 1$G) "+ PRINT 6H2#% )+ PRINT TAB72+8D Aonitor% -+ PRINT )!" # $!2% $+ PRINT computer% () 1+.$%%$w&n. cls 2+.r"2 1+ PRINT )!-#%D )!2+ PRINT " "+ PRINT TAB7$+8D :elcome % )+ PRINT 5!)% -+ PRINT hello% D ton&% $+ PRINT 2+H)+ 5!) helloton& $+ )!-#2+ " :elcome Pa2e . SCR**N 1 2+.o( - . r$+% $+ end 1+ SCR**N 1 2+ C4L4R " "+ 9RA: B)+D9)+% )+ 9RA: *-$% -+ 9RA: R$+% $+ *N9 Q 7 8r&!e !'e $#!+#! .$r !'e .