WEEK 3
TOPIC: Examples of BASIC PL
CONTENT
Q-BASIC PROGRAMS
1)Write a program to enter your name and print it .
CLS
Input ‘Enter you name’;n$
Print ‘The name is’;n$
End
2)Write a program to enter your name, city, country, age and print them.
CLS
Input ” Enter the name “;N$
Input ” Enter the city”;C$
Input ” Enter the country”;CO$
Input ” Enter the age”;A
Print ” The name is “;N$
Print ” The city is “;C$
Print ” The country is “;CO$
Print ” The age is “;A
End
3)Write a program to find the area of rectangle.
Cls
Input ” enter the length ” ;l
Input ” enter the breadth ” ;b
let A = l*b
Print” the area of rectangle=” ;a
End
4)Write a program to find the area of the triangle.
Cls
Input ” enter the base” ;b
Input ” enter the height” ;h
let T = 1/2*b*h
Print” The area of triangle=” ;T
End
5)Write a program to find the area of the circle.
Cls
Input” Enter the radius ” ;R
Let C=22/7*R^2
Print ” The area of circle =” ;C
End
6)Write a program to find the circumference of the circle.
Cls
Input” Enter the radius ” ;R
Let Circumference=22/7*R*2
Print ” The area of circle =” ;Circumference
End
7)Write a program to find the area of the square.
Cls
Input” Enter the number” ;n
Let square= n^2
Print” The area of square=” ;Square
End
8)Write a program to find the area of the square and cube.
Cls
Input” Enter the number” ;n
Let square= n^2
Let Cube = n^3
Print” The area of square=” ;Square
Print” The area of cube=” ; Cube
End
WEEK 4
TOPIC: Graphic Packages
CONTENT
GRAPHICS PACKAGES
A graphics package is an application that can be used to create and manipulate images on a computer.
There are two main types of graphics package:
- painting packages
- drawing packages
Painting packages
- A painting package is a graphic application that can be used for processing photographs by manipulating features like colors, effects, brightness, etc
- A painting package produces images by changing the colour of pixels on the screen.
Advantages
- The main advantage offered by this type of graphic is that it can be used for adjusting and beautifying photographs
- Disadvantages of painting packages
- Individual parts of an image cannot be resized;
- only the whole picture can be increased or decreased in size.
Examples of graphics packages that produce bitmapped images include:- MS Paint, PC Paintbrush, Adobe Photoshop and JASC’s Paint Shop Pro.
Drawing packages
- A drawing package produces images that are made up from coloured lines and shapes such as circles, squares and rectangles.
- When an image is saved it is stored in a vector graphics file as a series of instructions, which can be used to recreate it.
Main advantages of vector graphics are:
- They use less storage space than bitmap graphics;
- Each part of an image is treated as a separate object, which means that individual parts can be easily modified.
Disadvantages of drawing packages
- They don’t look as realistic as bitmap graphics.
Examples of drawing graphics packages include CorelDraw, Micrographix Designer and computer aided design (CAD) packages such as AutoCAD.
Common features of graphics packages
- Drawing straight lines and ‘freehand’ lines;
- Drawing regular pre-defined shapes like squares, rectangles and circles using a special ‘tool’;
- Entering text and changing the style and size of font;
- Changing the size of an object, or scaling;
- Rotating objects in either clockwise or anticlockwise by specifying the direction and angle of rotation;
- Stretching objects either horizontally or vertically. ‘Flipping’ an object either horizontally or vertically.
- A paint palette from which different colours and patterns can be chosen.
- A fill option for colouring in a shape or area on the screen with a colour or pattern from the paint palette.
- Most graphics packages have a built-in library of clipart pictures.
- Zoom or magnify is a feature that allows an area of the screen to be seen close up for detailed work.
- Special brushes such as an airbrush can be used to achieve different paint effects on the screen.
- In most graphics these features are chosen from a toolbar or tool palette where they are displayed as icons.
Questions
- Define Graphic Package ?
- Mention the two types Graphic Package
Assignment
- Explain the Painting Package
- Explain the drawing Package