Question: Q3 Write Python Code Input file userlist.txt includes user names, last names, e-mail addresses and phone numbers as follows: Can Yilmaz cyilmaz@gnail.com 05326384431 Basar Cesme

Q3

Write Python Code

Input file userlist.txt includes user names, last names, e-mail addresses and phone numbers as follows:

Can Yilmaz cyilmaz@gnail.com 05326384431 Basar Cesme basar.cesme@hotmail.com 05416384432 Naz Nazli nnazli@maltepe.edu.tr 05341258443 Kemal Lale kemallale@hotmail.com 05336384433 Huseyin Aygun huseyinaygun@maltepe.edu.tr 05446384434

Write a Python program which reads from the input file userlist.txt and writes into the output files useremails.txt, userphones.txt and usercodes.txt as below.

The output file useremails.txt will include user name, last name and e-mail address. The output file userphones.txt will include user name, last name and phone number. The output file usercodes.txt will include the first letter of user first name + underscore sign + user last name all in lower case (Example: c_yilmaz)

You do not need to upload any output files along with your code.

useremails.txt Can Yilmaz cyilmaz@gnail.com Basar Cesme basar.cesme@hotmail.com Naz Nazli nnazli@maltepe.edu.tr Kemal Lale kemallale@hotmail.com Huseyin Aygun huseyinaygun@maltepe.edu.tr

userphones.txt Can Yilmaz 05326384431 Basar Cesme 05416384432 Naz Nazli 05341258443 Kemal Lale 05336384433 Huseyin Aygun 05446384434

usercodes.txt Can Yilmaz c_yilmaz Basar Cesme b_cesme Naz Nazli n_nazli Kemal Lale k_lale Huseyin Aygun h_aygun

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!