You are on page 1of 1

SSG 215: Intro to Engineering Computing - ASSIGNMENT 1

Instructions
I. Create a folder with ONLY your matric number as the name of the folder
II. Save all your codes within the folder well numbered according to the question numbers
here e.g., Q1, Q2
III. There must NOT be any subfolder within the folder created in (I) above
IV. Zip your folder and forward as mail to mogundero@unilag.edu.ng on or before Monday,
18/12/23, 10:00pm
N.B: the mail subject should read in capital letters, “SSG215_ASSIGNMENT_1” ONLY. It is only
the zipped file attached that should have your matric number.
Python string concatenation Exercises
1) Hello World
A. Create a variable and store the text “Hello” in it
B. Create another variable and store the text “World” in it
C. Print: “HelloWorld” using string concatenation
D. Create another variable C and add the two variables together in C and print C
2) Tell me about yourself
A. Create a variable name and store your name inside it
B. Create another variable age and store your age there
C. Print: My name is name and I am age years old. (Using concatenation)
Note: Remember to convert the age variable to a string if not you’ll get a TYPE ERROR.
3) Contact Info
A. Sharing your contact info doesn’t have to be your actual info
B. Create a variable name and add a string with your name
C. Create a variable phoneno and add a phone number to it
D. Print: Contact Info
E. Print: Name: Your name
F. Print: Name: Your phone number
4) Password Generator
A. Ask user for their favourite colour
B. Ask user for their month of birth (The number)
C. Ask user for their pet’s name
D. Combine all these using string concatenation to form the password
e.g. (Bruno12blue or yellowgrumpy5

You might also like