1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
QveST [7]
3 years ago
8

Write a program that first reads in the name of an input file, followed by two strings representing the lower and upper bounds o

f 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 output all strings from the list that are within that range (inclusive of the bounds). 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 classified federation graduation millennium
Computers and Technology
1 answer:
xxTIMURxx [149]3 years ago
3 0

Answer:

Python code explained below

Explanation:

f = open(input())

#loading the file, which will serve as the input

s1 = input()  

s2 = input()

lines = f.readlines()

for line in lines:

   line = line.strip(

# strip() removes characters from both left and right

   if s1 <= line <= s2:  #setting the range

       print(line)

f.close()

#closing the file

You might be interested in
The intended purpose of the following module is to determine whether the value parameter is within a specified range. The module
BARSIC [14]

The program does not consists of any syntax error but the module contains error in logic especially while placing the condition inside if statement.

Here we are actually planning to check whether the number passed in the “value” variable is within the given lower and upper range which is passed in second and third parameter.

Solution 1:

if value<=lower AND value>=upper Then

Display “The given number is outside the specified range.”

else

Display “The given number is within the specified range.”

End if

Alternate solution:

So for that the condition needs to be value>=lower and value <=lower. so  

if value > lower AND value <upper Then

Display “The given number is within the specified range.”

else  

Display “The given number is within the specified range.”

7 0
4 years ago
Four actions that can be implemented on a database to autocorrect violations of referential integrity, and the outcomes of the a
Paraphin [41]

Answer:

Follows are the matching to this question:

Option \ a \to \ Option \ 3\\\\Option \ b \to \ Option \ 4\\\\Option \ c \to \ Option \ 1\\\\Option \ d \to \ Option \ 2\\

Explanation:

While time-consuming or prone to errors mechanical adjustments to both the referential, databases could be configured with four measures to engine violations. The restricted action causes the insert, update, and removes to only be denied. Set Null to NULL sets the invalid external key, whereas Set Default to a specific core consideration specified in SQL sets a default foreign key. Its Cascade operation spreads the main changes in external keys.

6 0
3 years ago
PLEASE HELP I WILL GIVE BRAINLIEST AND 100 POINTS IF U ANSWER COMPLETELY WITHIN 30 MIN
icang [17]

Answer:

Explanation:

be themselves and that is more than enough to be beautiful. Lastly, I would organize the colorson each photo to be organized to make it look like flowers. That would add a nice touch to seemlike the unorganized pictures are actually organized.

7 0
3 years ago
Someone please help ASAP will brainlist
Arada [10]

Answer:

i cant help

Explanation:

4 0
3 years ago
Read 2 more answers
What is Service Oriented architecture &amp; How is it different form Object Oriented Middleware?
topjm [15]

Answer: This can be explained s follows :-

Explanation: The approach in which services available in the network are used by the applications is called service oriented architecture. In such structure a business function is provided by each service that is independent of other services.

Object oriented programming is a programming paradigm. OOP can be used outside of that architecture or it can be apart of SOA as well .

3 0
3 years ago
Other questions:
  • Consider the following program segment. ifstream inFile; //Line 1 int x, y; //Line 2 ... //Line 3 inFile &gt;&gt; x &gt;&gt; y;
    13·1 answer
  • How do you change the username on here?
    14·1 answer
  • Suppose an initially-empty queue Q has performed a total of 32 enqueue operations, 10 front operations, and 15 dequeue operation
    14·1 answer
  • Which biometric technique is considered nearly infallible from a scientific point of view and is increasingly preferred by crimi
    8·1 answer
  • Which of the following is NOT true about high-level programming<br> languages?
    9·2 answers
  • In a geographic file arranged by state and then city, you would file a letter from a company that does not have an individual or
    6·1 answer
  • Study the sentences below. A.Changing the properties of characters in a sentence or paragraph in a Word document helps increase
    5·2 answers
  • An important strategy in survey design involves the use of terms, phrases, and words that are known to both the PI team and resp
    9·1 answer
  • What does place value mean with binary?
    6·1 answer
  • Which of the following terms means the computer operating system automatically detects and installs the proper driver for a new
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!