Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Help 4 questions please write python code please https//wwwonlinegdb_com/online_python_compiler 1. (SPts) John Donne is one of the famous poets and wrote following poem titled No

Help 4 questions please
write python code please image text in transcribed
https//wwwonlinegdb_com/online_python_compiler 1. (SPts) John Donne is one of the famous poets and wrote following poem titled "No man is an island:" Write your Python code to save following poem as a file titied poem.txt. Make sure that you close the file at the end of your code. No man is an island, Entire of itself. Every man is a piece of the continent, A part of the main. if a clod be washed away by the sea. Europe is the less. As woll as if a promontory were. As well as if a manor of thy friend a Or of thine own were: Any man's death diminishes me. Because I am involved in mankind. And therefore never send to know for whom the bell tolis: is tolls for thee. 2. (SPts) Open the file poem.txt and append the date 2/21/23 at the end of the file. Look at the hint below: with open("filename.txt", "a") as file: file.write("Hello n1 ) file.write("World"") file.close() 3. (5Pts) Open the file poem.txt and count the number of words in the file using Python. 4. (SPts) Open the file poem.txt and count the frequencies of the word "man" in the file using Python

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Learning PostgreSQL

Authors: Salahaldin Juba, Achim Vannahme, Andrey Volkov

1st Edition

178398919X, 9781783989195

More Books

Students also viewed these Databases questions

Question

LO1 Understand risk management and identify its components.

Answered: 1 week ago