Saturday, 15 February 2014

Revision - Class 6

BASIC

Constant :
Value which does not change.
There are two types :
1.     Numeric Constant
2.     String Constant
Numeric constant
Numbers negative, positive, decimal or whole numbers.
Example :
 -5
1345
78.12
String Constant
This is also called Alphanumeric constant. It consists of numbers or alphabets or special characters ,it is written within double quotes(“  “).
Example :
“Cottons”
“Bangalore”
“Exam March 2014”
Variable
1.     Numeric Variable
2.     String Variable
Numeric Variable:
A variable that holds the numeric constant.
Example :
A
X1
XY
String variable
The variable that holds the alphanumeric constant. This cannot be used for arithmetic calculations. This variable must end with a $ sign.
String Variable
String Constant
Must end with $
Must be enclosed within “ “
Eg: a$,  name$,  xy$
Eg: a, xy



Operators


·        Arithmetic Operators


·        Relational Operators


·        Logical Operators


Arithmetic Operators : We are going to use all the following operators in our program, for example multiplication is  *(asterisk) not x as we use in Maths.
Addition     +
Subtraction -
Multiplication *
Division      /
Exponential  ^
Relational Operators: They are used to perform comparisons.The relational operators will give TRUE or FALSE after comparision.
Less than              <
Greater than                   >
Less than or equal to     <=
Greater than or equal to >=
Equal to                         =
Not equal to                            < >
Logical Operators: They are also called Boolean Operators.
·        AND          
·        OR
·        NOT
Let us see how the logical operator works.
Imagine a condition for getting a scholarship, either you should score above 90 in Computer science or above 80 in Maths. Assume that you have scored 85 in Computers but 87 in Maths. It is very clear that you will get the scholarship.
Computer Science (C)
Maths (M)
Result (C>90) OR (M >80)
95
63
True
71
81
True
95
100
True
46
52
False
 
The second condition is you should score above 90 in Computer science and above 80 in Maths.
Computer Science (C)
Maths (M)
Result (C>90) AND (M >80)
95
63
False
71
81
False
95
100
True
46
52
False
 




 
Commands
1. Print Command:
It is used to display the output on the screen.
Example:
Print “Hi I am in Class 6”
Print 20 *5
The  first command is within the quotes since it is a string constant. The second command calculates the expression and gives the answer 100
Print with comma
Print with semicolon
Print with Colon
Empty Print - This gives an empty line.

 

INPUT

It accepts the values from the user through the keyboard.

Difference between LET and INPUT is :

If we are using LET command the values of the program remains the same, therefore whenever we execute(RUN) the program, the output remains the same.

If we are using INPUT command, different values can be given each time we execute the program.

To accept a number:

Input A

To accept a string:

Input A$
 

 

1. Write a program to enter the side and calculate the area of a square.

        (Area of square= side x side)


Print “Enter the side”


Input S
Let area= S * S
Print area
End

 
 
Note :
Print "Enter the side" and Input S can be combined into a single statement.
Input "Enter the side" ; S
 
2. Write a program to find the area of a rectangle.
      ( Area of rectangle= Length X Breadth)
 Print “Enter Length and breadth”
Input L, B
Let A=L * B
Print A
End
3. Write a program to enter 2 numbers and display the sum, difference, multiplication and division
Print “Enter 2 Numbers”
Input a,b
Let s=a+b
Let diff=a – b
Let M=a*b
Let D=a/b
Print “Sum=” ;s
Print “Difference=”;diff
Print “Product=”; M
Print “Division=”; D
end
 
Conditional statements

This will execute the statements based on a given condition. Computer cannot take any decision , so we should instruct the computer to take some action based on the condition given by the user.

·        If Then

·        If then else

IF THEN ELSE

Syntax:

If condition then

Statement 1

Else

Statement 2

End if

 Note:
If you are using If then syntax, it will take action for only one condition , but If then Else will give you an answer for both the true condition or false condition.

1.     Write a program to enter a number check whether it is positive or negative.

(A number is said to be positive if it is greater than 0 otherwise it is negative)

Print “Enter a number”

Input N

If N > 0 then

    Print “Positive”

Else

    Print “Negative”

End if

End

 

2.     Input two numbers and display the biggest number.

Print “Enter two numbers”

Input a, b

If a>b then

    Print a “is big”

Else

    Print  b “is big”

End if
 
            End
3. If the mark entered is below 45, then you should print Fail otherwise print Pass.

         Input "Enter your mark " ; M
  
         If M > = 45 then
 
            Print "Pass "
        
         Else
      
           Print "Fail"

         End if

        End

 

 
 




 

Friday, 13 December 2013

Class 6 - Internet

I. Write the full form for the following terms:
  1. ARPANET
  2. WWW
  3. NSFNET
  4. ISP
  5. URL
  6. Bcc
  7. Cc
II. Identify the following abbreviations:
  1. .com
  2. .net
  3. .edu
  4. .org
  5. .mil
  6. .in
  7. .ca
  8. .fr
III. Fill in the blanks:
  1. A ___ is a computer connected to the internet and stores the web pages.
  2. An e-mail address is divided into two parts namely, the _____ and the identity of the _____.
  3. A _____ is used to jump to another part of the same web page or to move to a different web page.
  4. The received e-mails are stored in ______.
  5. A ____ is the first page that you see when you open any website.
  6. Airtel is an example for_____(web browser,ISP,web server)
IV. Answer the following questions:
1. Define the terms:
  • Web server
  • Web browser
  • Download
  • Upload
2. What are the advantages of e-mail?
3. Write a short note on domain name.
4. Explain the structure of the e-mail address.
5. Explain online and offline.
6.What is a modem.
7. Explain : URL
8.
 

Monday, 9 December 2013

Sunday, 1 December 2013

Class 7- Flash tutorial

I have made some videos for Flash lesson.

Shape Tween :
 

 
Motion Guide
 

 
Frame by Frame animation
 
 

Saturday, 30 November 2013

Class 7 - Revision

Flash (ch # 5)
Pen Tool
It is used to draw precise paths with straight lines and smooth flowing curves.
Eyedropper Tool
It is used to get colours and style from the existing lines, brush strokes and fills and applying the same to other object.
Gradient Transform Tool
It is used to transform the gradient filled area of an object
Timeline
It is the area where the timing and sequencing of several graphics and other elements of flash movie.

Frames
It determines the content that should appear at a specific point in the movie. Shortcut key is F5.
Keyframe
It indicates the start or end of an action in the animation.
Layers
 

 
 

 Symbols

It is a reusable graphic image, button, movie clip or text that is stored as a part of a Flash movie.
An instance is an occurrence of a symbol on the stage.
  •   Symbols are used in a movie  when many objects in the movie need to be reused.
  • It reduces the file size since a specific symbol needs to be saved only once irrespective of the number of instances of that symbol we use in the document.
To convert the drawings into symbols select Convert to symbol from Modify menu. Shortcut key is F8.
Library
All the symbols that are used in the movie are stored in the library. These symbols in the library can be added, duplicated, deleted, edited and updated. Short cut key is F11.

Friday, 1 November 2013

Class X - Assignment

1. Write a program to create three single dimensional arrays integer empcode[], double sal[], double spl[] to store employee code, monthly salary and special allowances of 10 employees. Calculate the total monthly salary (sal =spl) and annual salary and total allowance.
2. Design a function void showtax(double tax[]).This function takes single subscripted variable tax[] as function argument with income tax amount of 8 salaried persons.Print average tax of all the persons along with maximum and minimum tax amount paid by the persons.
3. Write a program to initialize a single dimensional array num[] of 10 integer elements. Arrange the arry in descending order using bubble sort method.Print the array before and after sorting. Each array shoud be printed in single line with a suitable space between each element.
4. Write a program to initialize a single dimensional array number[] with 8 phone numbers of long integer tye. Arrange the array number[] in ascending order using any standard sorting method. Input a phone number 'phone'. Search 'phone' from the sorted list number[] using binary search method. Print the sorted array number[] in a single line with suitable space and also print message " Phone number not found in the list. Search unsuccessful."
5. Write a program to store average cycling speed of 10 cyclist falling in the following categories In two columns
      Average speed (km/hr)                             Number of Cyclists
                5 - 20                                                            xx
              21 - 50                                                            xx
              51 - 75                                                            xx
              76 - 89                                                            xx
              90 - 100                                                          xx
6. Write a program to input a string. Convert the string into lowercase form and print the following pattern.
e.g :
Input : COBOL
Output :
cobol
cobo
cob
co
c
7. Write a program to input a string and display the number of uppercase characters, number of lowercase characters and number of digits present in the string. Make a suitable se of character functions.
8. Write a class arrange to input 5 car names in a array of string. Arrange car names in reverse alphabetical order using any sorting method.Print unsorted and sorted car names along with suitable headings.
9. Write a program to create a class arrangeletters and a method formalletters() with a string as parameter to input a word. Convert the word into uppercase form. Arrange each letter of the word in alphabetical order. Print the word before and after arranging letters in A - Z order.
e.g :
Input : LanGuAge
Output :
Original word = LanGuAge
Word in capitals = LANGUAGE
Word after sorting = AAEGGLNU
10. Write a program to input strings one by one till the user wants to continue . Find and print total number of strings which end with the string "ball".
Enter a word : football
Do you wish to continue? Press 1 to continue and 0 to exit
Enter a word : snowball
Total strings that ends with ball are/is : 2
11. Write a program to input a name. Convert each letter to its opposite case . Print the original and new name along with suitable messages.
Input : Sky LiNe
Output :
Original Name : SkY LiNe
New Name : sky lInE
12.Write a program to input a name and print the initials except the last word(surname). Each initial must be followed by symbol dot(.).
At the end , print total number of characters in the original name and in the initials except the blank spaces and other characters.
Input : Mahinder Singh Dhoni
Output : M.S Dhoni
Number of characters in the original name : xx
Number of characers in the initials : xx
13. Create a class interchange and a function change(interchange s) which receives two strings by reference. Interchange the strings stored in the object 's'.
14. Write another function to input two strings and interchange these strings by invoking function by reference. Print strings before and after interchange.
15. Create a function int countvowels(String str, char ch) to get a string in str and a vowel in ch. If the character stored in ch is a vowel, then convert into capital if small and return the occurance of capital vowel stored in ch from the string str if ch is present in str otherwise return 0. If character in ch is not a vowel, return -1.
16. Write a main function to input a string and a character. Print the occurance of ch in str by invoking the function countvowels().
17. Specify the class finder with the following overloaded functions :
  i. int findmax(int n1, int n2) to decide and return largest from ni and n2. If both the numbers are same then return 0.
ii. int findmax(int n1,int n2,int n3) to decide and return largest from n1,n2 and n3. If all the numbers are same then return 0.
iii. Write a main function to input three numbers x,y,z(using scanner class method) and by invoking above functions print the largest from x,y and x,y,z. Use function overloading concept.
18. A number is said to be neon, if sum of all the digits of square of a number is equal to the number itself.
e.g : 
Input :
9
Its square : 81 = 8+1 = 9(so it is a neon number)
25
Its square : 625=6+2+5=13o it is not a neon number)
19. Write a program to evaluate the function:
f(x) = (z2+2z)/(z+1) for all the values of z ranging from -4 to 4 by step 1.
i.e
x=-4,-3,-2,-1...........3,4
20. Write a program to input two numbers s1 and s2. Produce another number s3 which is the merging of numbers stored in s1 followed by s2. Print the values of s1, s2 and merged number s3.
e.g :
s1=256
s2=43
s3= 25643