Hi All,
I am learning python by myself. I have some knowledge about C. But What I need to give output for an addressbook using python is(By taking user input) :
Name Mobile Address
abc 123 xyz
Further if I append some entries in the book like
mno 456 stu
I need the address book to get updated and displayed as:
Name Mobile Address
abc...
User Profile
Collapse
-
Writing a simple address book in python
-
Dipak Singh replied to How to count no. of occurance with line no. of multiple words individually in a file?in PerlMiller,
Sorry to say that I was trying to do this program on my own. I was having a joint learning session of Perl with one of my friends. It was not any kind of homewprk. BTW many thanks for your all replies. Hope to see help from you later in some other topic.
Regards,
Dipak Kumar Singh -
Dipak Singh replied to How to count no. of occurance with line no. of multiple words individually in a file?in PerlWhat I want is as below:
My FIle is like this:
Reading from a file in perl Perl gives us a way to create "flat text file" databases. These can be useful, and are fairly easy to Try set up. The downside is that you need to deal with file permissions, and there is the possibility of data being overwritten. is Is However, as we get into it further we will try to discuss those issues in more detail. First, let's...Leave a comment:
-
Dipak Singh replied to How to count no. of occurance with line no. of multiple words individually in a file?in PerlHi Miller,
Yeah it worked now! It was not able to locate "strict.pm" . Also only those words were getting count and printed which matched in the file.
I worked on the code to get a desired output for word count. But still I am not able to assign the respective line no.s for each word where they are matched. Please help. Refer to the code below for any suggestion:
my @file;
my $i=0;
...Leave a comment:
-
Dipak Singh replied to How to count no. of occurance with line no. of multiple words individually in a file?in PerlHi rowf,
I am not able to go into the loop for conuting the no. of occurance of each input word taken from the user. The code submitted by me is still the same.
Regards,
Dipak Kumar SinghLeave a comment:
-
Dipak Singh replied to How to count no. of occurance with line no. of multiple words individually in a file?in PerlHi Miller,
I am not able to go into the loop for conuting the no. of occurance of each input word taken from the user. The code submitted by me is still the same. I tried to run your code it's showing syntax errors! Sometimes it's giving "unmatched curly braces" and sometimes it's not even taking inputs.. Please run your code once to get the same.
Regards,
Dipak Kumar SinghLeave a comment:
-
Dipak Singh replied to How to count no. of occurance with line no. of multiple words individually in a file?in PerlHi,
Thanks for your reply. But it is only taking the input and printing them sequentially:(. Nothing else is happening... Please help
Regards,
Dipak Kumar SinghLeave a comment:
-
Dipak Singh started a topic How to count no. of occurance with line no. of multiple words individually in a file?in PerlHow to count no. of occurance with line no. of multiple words individually in a file?
Hi,
I am a beginner at perl. I am writing a program to open a file, take input from user for the words he wants to search within that file, print it then print the no of occurance of each word with respective line no.s in the file.
Below is the code written by me:
...Code:#printing the file open (MYFILE, 'C:\Documents and Settings\dsingh20\My Documents\Perl_Task.txt'); while (<MYFILE>)
No activity results to display
Show More
Leave a comment: