Skip to content

Molal/Phonebook-

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

Phonebook-

Phonebookk example Write a program that reads a text file. The file is a list of contact details for people. With each contact you're given the name, phone number and email address. Your dictionary should be a mapping from contact names to email and phone number for that contact. Your program should then ask for user input. The input should be a single name. If the name can be found in the contact list then output the name and contact details for that person, otherwise output No contact with that name.

The contact list file is: Liam 345-45643454 liam@mymail.com Noah 324-43576413 noah.doe@gmail.com Tony 987-56543239 tony@hr.mycompany.com Bert 654-99275234 bert.hertz@support.hertz.co.uk

If the user then enters the following names in this order:

Tony Noah John Annie Bert Your program should give the following output:

Name: Tony Email: tony@hr.mycompany.com Phone: 987-56543239

Name: Noah Email: noah.doe@gmail.com Phone: 324-43576413

The program runs to answer the question above You need to copy and paste the code Phonebook_Assignment on your python envronment If you are using google colaboratory then Copy and paste the python code. Upload the data.txt file on your google colab. Run the code

About

Phonebookk example

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published