Find Jobs
Hire Freelancers

Small Python Project 5

$10-30 USD

Terminado
Publicado hace más de 5 años

$10-30 USD

Pagado a la entrega
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
ID del proyecto: 18255371

Información sobre el proyecto

4 propuestas
Proyecto remoto
Activo hace 5 años

¿Buscas ganar dinero?

Beneficios de presentar ofertas en Freelancer

Fija tu plazo y presupuesto
Cobra por tu trabajo
Describe tu propuesta
Es gratis registrarse y presentar ofertas en los trabajos
Adjudicado a:
Avatar del usuario
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 en 1 día
5,0 (16 comentarios)
3,9
3,9
4 freelancers están ofertando un promedio de $31 USD por este trabajo
Avatar del usuario
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 en 1 día
4,5 (13 comentarios)
4,5
4,5
Avatar del usuario
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 en 1 día
5,0 (1 comentario)
1,4
1,4

Sobre este cliente

Bandera de UNITED STATES
Austin, United States
5,0
3
Forma de pago verificada
Miembro desde sept 17, 2018

Verificación del cliente

¡Gracias! Te hemos enviado un enlace para reclamar tu crédito gratuito.
Algo salió mal al enviar tu correo electrónico. Por favor, intenta de nuevo.
Usuarios registrados Total de empleos publicados
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Cargando visualización previa
Permiso concedido para Geolocalización.
Tu sesión de acceso ha expirado y has sido desconectado. Por favor, inica sesión nuevamente.