Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

fh=open(python.txt,r) count=0 a=fh.readlines() if (a.tolower().count(an) > 0): print(a) fh.close() fname = python.txt num_words = 0 f= open(fname, 'r') words = f.read().split() o for a in

image text in transcribed

fh=open("python.txt","r") count=0 a=fh.readlines() if (a.tolower().count("an") > 0): print(a) fh.close() fname = "python.txt" num_words = 0 f= open(fname, 'r') words = f.read().split() o for a in words: if (a.tolower() == "a" or a.tolower() == "an"): num_words = num_words + 1 print("Number of words:", num_words) f.close() fh=open("python.txt","r") count=0 lines=fh.readlines() o for a in lines: if (a.tolower().count("an") > 0): print(a) fh.close() fname = "python.txt" num_words = 0 f= read(fname, 'r') words = f.read().split() for a in words: if (a.tolower() == "a" or a.tolower() num_words = num_words + 1 print("Number of words:", num_words) f.close() "an")

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

Step: 3

blur-text-image

Ace Your Homework with AI

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

Get Started

Students also viewed these Databases questions

Question

2. What additional techniques might be used to assess talent?

Answered: 1 week ago

Question

What is the best conclusion for Xbar Chart? UCL A X B C B A LCL

Answered: 1 week ago