Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

Worksheet

2023-2024

Name: Subject: Computer Science


Grade: Topic: Computer Networks
Date:

1. Consider the following Lists and Strings for answering questions given below:
S1 = “8IGCSE Computer Science”
S2 = “Inventure Academy”
S3 = S2[-3: ]
Write the output produced by each of the following Python statements
print(S1[1:6]) ……………………………………………………………………………………….

print(S3.upper())…………………………………………………………………………………….

print(S1[0:6] + " " +S2[0:9]) …………………………………………………………………………

2. Daisy is a computer technician. She is responsible for making sure all new employees are given a
username to access the computer network.
The rules for creating a new username are as follows:
Step 1: The employee’s first name is entered (e.g. Keith)
Step 2: The employee’s surname is entered (e.g. Olivia)
Step 3: A username is then made up from:
The first three characters of the surname (e.g. Oli) followed by the first letter of their first name
(e.g. K)
Output: OliK
Write a program that helps Daisy create a new username for one employee and print it
3. A program is written to generate a password for a person from the username provided. The rules for
creating a password are as follows:
- It starts with a $ sign
- followed by the first two characters of the username
- followed by a # sign
- followed by the last two characters of the username
- Ends with the number of characters the username has
Write a program to input a username and create a password with the rules given above

You might also like