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

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

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

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

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.