ICT/2022/139
R.S.R. Ranathunga
Tutorial 01
1) Print message “Hello World”.
1. What output do you need to generate? A message “Hello World”
2. What input do you have/ need? No
3. What form will it be in? No
4. Will the program have a list of tasks that needs to be done repeatedly (LOOP)? No
5. What are the other major tasks of the program?
- Display “Hello World”
2) Print your Curriculum Vitae.
1) What output do you need to generate? Curriculum Vitae
2) What input do you have/ need? Name, Age, Address, Contact number, Educational details
3) What form will it be in? Name as text, Age as integer, Address as string, Contact number as integer, Educational details as string
4) Will the program have a list of tasks that needs to be done repeatedly (LOOP)? No
5) What are the other major tasks of the program?
Create the Curriculum Vitae layout
- Input Name
- Input Age
- Input Address
- Input Contact number
- Input Educational details
- Display Curriculum Vitae
- Input the given numerical value
- Multiple the numerical value by 100
- Assign it to N
- Display N
4) Calculate the volume of a cylinder. PI * r2 h
1) What output do you need to generate? A volume of a cylinder as P
2) What input do you have/ need? PI Radius of the cylinder as r Height of the cylinder as h
3) What form will it be in? PI as a numerical value Radius as a numerical value Height as a numerical value
4) Will the program have a list of tasks that needs to be done repeatedly (LOOP)? No
5) What are the other major tasks of the program?
- Input r
- Input h
- Input PI as 3.14 Calculate,
- P= 3.14*r*r*h
- Display P
5) Calculate average marks of 4 subjects which, entered separately.
1) What output do you need to generate? The average marks of 4 subjects as Average
2) What input do you have/ need?
The marks of first subject as S1
The marks of second subject as S2
The marks of third subject as S3
The marks of fourth subject as S4
3) What form will it be in?
First subject marks as an integer value
Second subject marks as an integer value
Third subject marks as an integer value
Fourth subject marks as an integer value
4) Will the program have a list of tasks that needs to be done repeatedly (LOOP)? No
5) What are the other major tasks of the program?
- Input S1
- Input S2
- Input S3
- Input S4
- Calculate, Average= [S1+S2+S3+S4]/4
- Display Average
Comments
Post a Comment