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( -

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

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

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

$%%$w&n. 9RA: B)+%D%9)+% )+ 9RA: *-$% -+ dra.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 .o( - . PRINT 1$G) "+. 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+.") 1+. 9ASIC Pr$. SCR**N 1 2+. C4L4BR " "+.$r !'e . r$+% $+ end 1+ SCR**N 1 2+ C4L4R " "+ 9RA: B)+D9)+% )+ 9RA: *-$% -+ 9RA: R$+% $+ *N9 Q 7 8r&!e !'e $#!+#! . cls 2+.

Master your semester with Scribd & The New York Times

Special offer for students: Only $4.99/month.

Master your semester with Scribd & The New York Times

Cancel anytime.