Practical 3
Practical 3
DEPARTMENT: CSIT
PRESENTED TO: IMV, DGI, PG, MEC, ESC, MT, LCC, DR, WQM, MB, SS, TXE, MNE, SS,
MMB, GIS, SES
Practical session 2
Task 1: string concatenation
• Create a variable and assign it the first name using the input function
• Create another variable and assign last name using the input function
• Concatenate the 2 variables and store the result in a new variable called fullname
• Use the variable fullname to display the full name on the screen and produce a reasonable
output (leave spaces between the first name and the last name)
• Print the result on the screen using the variable age2 by saying your age is
…
Task 4:
Gracious has a value of 3 and he wants to share this value to Martha who apparently understands
numbers with decimal points only. As a solution to this, use your knowledge of type casting to
create a variable named x that will hold the floating point number from the integer 3 and print this
value on the screen.
Task 5: