Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

9.8 LAB: Words in a range (lists) Write a program that first reads in the name of an input file, followed by two strings representing

9.8 LAB: Words in a range (lists)

Write a program that first reads in the name of an input file, followed by two strings representing the lower and upper bounds of a search range. The file should be read using the file.readlines() method. The input file contains a list of alphabetical, ten-letter strings, each on a separate line. Your program should determine if the strings from the list are within that range (inclusive of the bounds) and output the results.

Ex: If the input is:

input1.txt ammoniated millennium 

and the contents of input1.txt are:

aspiration classified federation graduation millennium philosophy quadratics transcript wilderness zoologists 

the output is:

aspiration - in range classified - in range federation - in range graduation - in range millennium - in range philosophy - not in range quadratics - not in range transcript - not in range wilderness - not in range zoologists - not in range

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

Recommended Textbook for

Professional Visual Basic 6 Databases

Authors: Charles Williams

1st Edition

1861002025, 978-1861002020

More Books

Students also viewed these Databases questions

Question

What is the Definition for Third Normal Form?

Answered: 1 week ago

Question

Provide two examples of a One-To-Many relationship.

Answered: 1 week ago