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
how can you turn on a light switch and it not work, without turning off the power to the whole house?
vitfil [10]

Answer:

Go to the beaker box and turn off the power to that one room. Duh

Explanation:

6 0
3 years ago
Data elements in a relational database are organized into ____
Rainbow [258]

Data elements in a relational database are organized into _Tables_

Hope it helps!

8 0
2 years ago
Write the definition of a function named timeOnHighway that receives three parameters, all of type double: mileEndingPoint , mil
dybincka [34]

Answer:double timeOnHighway (double mileEndingPoint, double mileStartingPoint = 0.0, double speed = 55.0)

return (mileEndingPoint - mileStartingPoint) / speed

Explanation:

6 0
4 years ago
Which of the following is true about named ranges?
ohaa [14]

Answer:

Regarding a named range, the scope of a name is the location within which Excel recognizes the name without qualification. ... Once you name a range, you can change the size of the range using the Name Manager. True. You can create a new range by selecting the cells and typing a name in the Name box next to the formula bar ...

This is true about a range names. Hoped this helped a little. Im not sure which following you mean. maybe next time you can put a picture or descirbe it a little more or what the otions are.

I Hope You Have a Good Day or Night!! :)

Explanation:

5 0
3 years ago
You found an image on the Creative Commons that you would like to use. How do you give credit to the author? *
Archy [21]
You need to write the author’s name
7 0
3 years ago
Read 2 more answers
Other questions:
  • What is the relationship between IaaS and TCP/IP and network services?
    10·2 answers
  • Who predicted nearly 60 years ago that the rise of electronic media would create a "global village," thereby reducing the barrie
    12·1 answer
  • Nathan wants to create multiple worksheet containing common formatting styles for his team members. Which file extension helps h
    9·1 answer
  • What is the value of the variable named result after the following code executes? var X = 5; var Y = 3; var Z = 2; var result =
    14·1 answer
  • Signals that can travel in only one direction on a medium are referred to as what type of signal?
    12·1 answer
  • Please can somebody help me! i’m really stuck on this question
    9·1 answer
  • Which of the following is a tip for making sure you are messaging safely?
    5·1 answer
  • प्रश्न-20 उचित स्थान पर विराम चिह्न लगाइए
    8·1 answer
  • HELLLLLLLLLLLLLLLLLLLLP PLSSSSSSSSSSS HELLLLLLLLLP
    14·1 answer
  • can i get an access code for free online? if yes, what website is it so i can get a free access code?​
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!