• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Class 7 - Notes - Computer Science for Half Yearly Examination 2013
 

Class 7 - Notes - Computer Science for Half Yearly Examination 2013

on

  • 3,230 views

http://youtu.be/EOHr-zp39Qg

http://youtu.be/EOHr-zp39Qg

Statistics

Views

Total Views
3,230
Views on SlideShare
3,230
Embed Views
0

Actions

Likes
0
Downloads
17
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Class 7 - Notes - Computer Science for Half Yearly Examination 2013 Class 7 - Notes - Computer Science for Half Yearly Examination 2013 Document Transcript

    • Class 7 Theory Assignment - 1 1. What is a loop in a program ? In computer programming, a loop is used to repeat a block of statements a number of times. 2. What are the looping statements in Q BASIC ? There are three looping statements in QBasic: WHILE…WEND, DO…LOOP, and FOR....NEXT. 3. What is the difference between the DO WHILE loop and DO UNTIL loop ? DO WHILE...LOOP is executed as long as the condition is True whereas DO UNTIL...LOOP is executed as long as the condition is False. 4. What is the difference between the DO WHILE loop and DO LOOP WHILE forms of the DO LOOP ? The DO WHILE…LOOP is executed as long as the condition is True whereas DO...LOOP WHILE is executed at least once before the condition is checked. Also, the condition in the DO WHILE… LOOP appears before the loop starts whereas in DO...LOOP WHILE the condition appears at the end of the loop. 5. How many times is the loop executed in DO … LOOP WHILE if the condition starts off as false ? The loop will execute at least once even if the condition starts off as false in DO...LOOP WHILE. 6. Which looping statement is preferred if you know the number of repetitions ? FOR...NEXT looping statement is preferred if we know the number of repetitions. 7. What is the default STEP value in a FOR NEXT statement ? The default STEP value in a FOR...NEXT statement is one. 8. Can you have negative value in STEP ? If Yes, what will be true about the start and end values in the statement ? Yes, we can have negative value in STEP. In this case, the starting value is greater than the ending value. **********************************
    • Theory Assignment - 2 1. 2. 3. 4. 5. 6. 7. 8. What do you mean by GUI ? GUI is an interface that enables the user to interact with the application by using controls like icons, buttons, menus, dialog boxes, and windows. What is event driven programming ? Event-driven programming is one in which the program responds to events, which are actions performed by the user. Write the steps in the development of a Visual Basic application. The steps to develop a Visual Basic application are: i. Create a form. ii. Place controls on the form. iii. Set properties for the controls. iv. Add code to the controls to handle the events. What are the file extensions of a form file and a project file ? The extension of a form fi le is .vb and the extension of a project fi le is .vbproj. What are the two ways to place a control on a form ? The two ways to place a control on the form are: • Double-click on the control in the Toolbox. • Click on the control in the Toolbox and drag it onto the form. Name any four controls in the Toolbox. Four controls in the Toolbox are Label, Button, Combo Box, and ListBox. Name any two properties of Textbox and Label. Two properties of TextBox and Label are Font and Text. Write two ways to run a Visual Basic application. Two ways to run a Visual Basic application are: • Press F5. • Click Debug  Start Debugging. **********************************
    • Theory Assignment - 3 1. 2. 3. 4. 5. 6. 7. 8. 9. What is a chat room ? A chat room is a service in which multiple users talk to each other in real time by posting messages. How does online chat differ from instant messaging ? Instant messaging is like a private chat room and has known users whereas online chat could also happen between unknown users. Name any two online chat services. Two online chat services are Yahoo! Messenger and Google Talk. How are newsgroups different from e-mail ? In a newsgroup messages are posted on a bulletin board where any member can read and respond to them, unlike e-mails that are sent to somebody’s private mailbox. List any three official newsgroup categories. Three official newsgroup categories are Alt(alternate), Biz(business, commerce), and Soc(social). Why are feed readers useful ? Feed readers are useful because they allow you to keep updated with new content from Web sites and you can easily subscribe to the Web site. What is online file sharing ? List few web sites that allow online sharing. An online file sharing service provides a way to store and access information in the ‘cloud’ rather than locally on a hard drive. The two Web sites that allow online file sharing are Picasa and YouTube. What are the benefits of using Picasa Web Albums ? The benefits of using Picasa Web Albums are that it allows easy photo sharing and storing, and also provides online backup. What is Cloud Computing ? Cloud computing is a technology that uses the Internet and central remote servers to hold data and applications. **********************************
    • TERM - II (Lab Activity) Class 7 Q BASIC ACTIVITY - I Write a Q BASIC program to help shivangi to print the first ten multiples of 5. Help her to write the program using WHILE … WEND statement. SOLUTION C=1 WHILE C <= 10 PRINT 5 * C C=C+1 WEND END Shyam wants to write a Q BASIC program to print the factorial of a given number using the FOR … NEXT loop. SOLUTION CLS INPUT “Enter a Positive Integer:”, X FACTR = 1 FOR N = X TO 1 STEP -1 FACTR = FACTR * N NEXT N PRINT “Factorial of “ ; X ; “ is “ ; FACTR END ACTIVITY - 2 Kunal’s sister is learning addition in Maths. She is trying to add numbers from 1 to 100. Can you make a program to print the sum of numbers 1 + 2 + 3 + . . . . + 100 ? CLS SUM = 0 FOR I = 1 TO 100 SUM = SUM + I NEXT I PRINT “SUM OF 1 + 2 + 3 + . . . + 100 = “ ; SUM END Sanya’s brother Simant is learning tables for a Math examination. Sanya has written a program that takes a number as input and displays the table of that number from 1 to 10. Can you write the same program ? Which looping statement would you prefer and why ? CLS INPUT "Enter a number"; X FOR N = 1 TO 10 PRINT X ; " X " ; N ; " = "; X * N NEXT N END
    • VISUAL BASIC ACTIVITY - 3 Kanika wants to create a VB application in which, if she enters her name and clicks Display button, the message 'Hello, Kanika !' will appear in the label. SOLUTION Step 1: Invoke Visual Basic 2010, and create a Windows Forms Application named HelloMessage. Step 2: Place two label controls, one text box control, and one button control on the form. Step 3: Set the following properties for the form and controls: Form1 Text : "Display Message" Font : Bold, 12 BackColor : Highlight Label1 Text : "Enter your Name" Font : Bold, 12 Label2 Text : blank (delete the text) Font : Bold, 12 BorderStyle : FixedSingle TextBox1 Text : blank (delete the text) Font : Bold, 12 Button1 Text : "Display" Font : Bold, 12 Step 4: Double click the Display button to get the code template. Add a line as shown: Step 5: Select Save Project As to save the VB application. Step 6: Press F5 to run the application. Step 7: Enter your name in the text box and click Display. The message will appear in Label2. Output: (to be drawn on the left page)
    • VISUAL BASIC ACTIVITY - 4 The Math teacher has asked Sarika to create a VB application to enter the radius of a circle and display its area and circumference. (Hint : Area = 3.14 * radius * radius, Circumference = 2 * 3.14 * radius). SOLUTION Step 1: Invoke Visual Basic 2010, and create a Windows Forms Application named Circle. Step 2: Place three label controls, three text box controls, and one button control on the form. Step 3: Set the following properties for the form and controls: Form1 Text : "Circle" Font : Bold, 12 Label1 Text : "Radius of a Circle" Font : Bold, 12 Label2 Text : "Area of a Circle" Font : Bold, 12 Label3 Text : "Circumference of a Circle" Font : Bold, 12 TextBox1 Text : blank (delete the text) Font : Bold, 12 TextBox2 Text : blank (delete the text) Font : Bold, 12 TextBox3 Text : blank (delete the text) Font : Bold, 12 Button1 Text : "Calculate" Font : Bold, 12 Step 4: Double click the Display button to get the code template. Enter the following code : Step 5: Select Save Project As to save the VB application. Step 6: Press F5 to run the application. Step 7: Enter radius in the text box and click Calculate. Area & Circumference of a Circle will be displayed as shown below. Output: (to be drawn on the left page)
    • Blue Print I. II. III. IV. V. VI. VII. Choose the correct answer : Fill in the blanks: State TRUE or FALSE: Write ONE WORD for the following: Answer in ONE or TWO lines: Answer in TWO or THREE lines: Answer in brief: Class 7 (15 x 1 = 15) (5 x 1 = 5) (5 x 1 = 5) (10 x 1 = 10) (10 x 2 = 20) (10 x 3 = 30) (3 x 5 = 15) Additional Exercises Answer in TWO or THREE lines: (3 marks) 1. Give the general format of the DO…WHILE and DO…UNTIL loops. Refer Page No.: 71 2. Discuss three data types in Visual Basic. Refer Page No.: 89 3. What are the four areas of a Visual Basic window ? Refer Page No.: 81 Answer in brief: (5 marks) Q BASIC Programs (4) (Marks : 100) (Time : 2 Hrs.)