Feb-24-2017, 07:54 PM
Hello guys, I would appreciate if anybody could help me start this homework (im not asking for someone to solve it just to keep in mind)
A variable “personal_details” is given, declared by the details of a group of some persons.
The data of each person separated by the symbol ':'
while the persons are separated by the symbol ';'
personal_details = "Andrew Ratcliffe:111111:07777777777;Michael Burton :22222222: 07888888888;"
So I need to develop a program that will ask the first name of the person and then to print what you asked for or to print all the details of each person.
In case if the name of the person is not exist then the program should display the necessary message (i.e There is no such person registered)
Examples:
· First example (hint: with bold is the data entry):
Give the name of the person you are looking for: Andrew
Select Data 1) Surame 2) Nr. ID 3) Nr. Mobile 4) All: 1
Andrew
Ratcliffe
· Second example:
Give the name of the person you are looking for: Andrew
Select Data 1) Surname 2) Nr. ID 3) Nr. Mobile 4) All: 4
Andrew
Ratcliffe
111111
Ratcliffe
07777777777
· Third Example:
Give the name of the person you are looking for: Andrew
There is no such person registered (Andrew)
A variable “personal_details” is given, declared by the details of a group of some persons.
The data of each person separated by the symbol ':'
while the persons are separated by the symbol ';'
personal_details = "Andrew Ratcliffe:111111:07777777777;Michael Burton :22222222: 07888888888;"
So I need to develop a program that will ask the first name of the person and then to print what you asked for or to print all the details of each person.
In case if the name of the person is not exist then the program should display the necessary message (i.e There is no such person registered)
Examples:
· First example (hint: with bold is the data entry):
Give the name of the person you are looking for: Andrew
Select Data 1) Surame 2) Nr. ID 3) Nr. Mobile 4) All: 1
Andrew
Ratcliffe
· Second example:
Give the name of the person you are looking for: Andrew
Select Data 1) Surname 2) Nr. ID 3) Nr. Mobile 4) All: 4
Andrew
Ratcliffe
111111
Ratcliffe
07777777777
· Third Example:
Give the name of the person you are looking for: Andrew
There is no such person registered (Andrew)