Find Jobs
Hire Freelancers

Small Python Project 5

$10-30 USD

Ολοκληρώθηκε
Αναρτήθηκε πάνω από 5 χρόνια πριν

$10-30 USD

Πληρωμή κατά την παράδοση
Summary: ----------- Your program will open a text file, read each line and count how many times each word appears in the file. Each word will be stored in a dictionary such that the key is the word and the value is the number of times the word appears in the file. Once all words have been counted, print the dictionary one element at a time as key-value pair using a for loop Details: -------- 1) Create a [login to view URL] file in your local workspace using the data given below 2) Write a program that opens the text file and reads each line. 3) Convert each line into a list of words. 4) For each word in the list, convert the word to lower case, remove any punctation and update a dictionary such that the word is the 'key' and the word count is the 'value'. 5) print the contents of the dictionary using a for loop such that each key-value pair is printed as below "The number of times ", <key>, "occurs in the dictionary is --> ", <value> 6) You must include exception handling around file operations or you will lose points. 7) You must comment any function definitions (if you choose to use function ) -- describe what the function does. If any parameters are passed, describe them. If anything is returned by the function, describe the return value. If you implement the entire program without any functions, you should comment in appropriate places as to what the block of code is doing Submit the proper comments. Example: ---------- "hello hello hello foo bar" would result in a dictionary: {"hello": 3, "foo" : 1, "bar" : 1} Hint: ----- The best way to convert a character string to a list of words is with the split() method. foo = "Computer science is fun and interesting." # bar is a list, such that each item # in the list is a word in the string foo # bar = [login to view URL]() print(bar) The output of the above code snippet: ['Computer', 'science', 'is', 'fun', 'and', 'interesting'] ----------------------------------------------------------------------------------- [login to view URL] ----------------------------------------------------------------------------------- All things bright and beautiful, All creatures great and small, All things wise and wonderful, The Lord God made them all
Ταυτότητα εργασίας: 18255371

Σχετικά με την εργασία

4 προτάσεις
Απομακρυσμένη Εργασία
Ενεργός/ή 5 χρόνια πριν

Ψάχνεις τρόπο για να κερδίσεις μερικά χρήματα;

Πλεονεκτήματα πλειοδοσίας στο Freelancer

Καθόρισε τον προϋπολογισμό σου και το χρονοδιάγραμμα
Πληρώσου για τη δουλειά σου
Περίγραψε την πρόταση σου
Η εγγραφή και η πλειοδοσία σε εργασίες είναι δωρεάν
Βραβεύτηκε στον/στην:
Avatar Χρήστη
Hello, read your description and pretty sure to complete these simple tasks. Your satisfaction by the quality of work is guaranteed. We can discuss further details in pm and can start working right away. Looking forward to hear back from you. kind regards,
$30 USD σε 1 ημέρα
5,0 (16 αξιολογήσεις)
3,9
3,9
4 freelancers δίνουν μια μέση προσφορά $31 USD για αυτή τη δουλειά
Avatar Χρήστη
Dear sir, How are you? My work completion time is fastest and the price is very good. I am a PYTHON expert. I will ensure that all the data you want is accurate and fast. You will see through my profile that I have guaranteed great python work for many clients. I will wait for your good response. Thanks and Best regards! JinXueTian
$15 USD σε 1 ημέρα
4,5 (13 αξιολογήσεις)
4,5
4,5
Avatar Χρήστη
I have experties in Python. I will be able to resolve your project as per your requirement. Please feel free to discuss. Regards
$30 USD σε 1 ημέρα
5,0 (1 αξιολόγηση)
1,4
1,4

Σχετικά με τον πελάτη

Σημαία της UNITED STATES
Austin, United States
5,0
3
Επαληθευμένη μέθοδος πληρωμής
Μέλος από Σεπ 17, 2018

Επαλήθευση Πελάτη

Άλλες δουλειές από αυτόν τον πελάτη

Small Python Project (3)
$10-30 USD
Small Python Project
$10-30 USD
Ευχαριστούμε! Σου έχουμε στείλει ένα email με ένα σύνδεσμο για να διεκδικήσεις τη δωρεάν πίστωση σου.
Κάτι πήγε στραβά κατά την προσπάθεια αποστολής του email σου. Παρακαλούμε δοκίμασε ξανά.
Εγγεγραμμένοι Χρήστες Συνολικές Αναρτημένες Δουλειές
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Φόρτωση προεπισκόπησης
Δόθηκε πρόσβαση για Geolocation.
Η σύνδεση σου έχει λήξει και τώρα έχεις αποσυνδεθεί. Παρακαλούμε συνδέσου ξανά.