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
If you are viewing a webpage with customized or regenerated content, such as updated stock quotes, what type of webpage are you
horsena [70]

Answer:

Dynamic

Explanation:

A dynamic web page is a type of web page that shows different and diverse content each time it's viewed. For instance, the webpage may adjust with every passing time of day, it might also change according to the different preference of each user that accesses the webpage, or the kind of user interaction.

5 0
4 years ago
Identify a true statement to determine the number of columns in a web table.
Rainbow [258]
B (each column gets a caption)
7 0
3 years ago
Read the section, "Junior Year." Why would someone chose to complete an apprenticeship after high school? How many occupations c
Tamiku [17]

An apprenticeship prepares you for a career through a structured program of on-the-job learning with classroom instruction, while you work and earn a salary. The programs can last from one to six years and you can choose careers in areas such as telecommunications, health care, computing, business support and the arts. The most common apprenticeships are in construction and manufacturing. If you like to work with your hands and your mind, you might want to consider an apprenticeship after high school. More than 850 occupations can be learned on the job through an apprenticeship.

7 0
3 years ago
Read 2 more answers
30 POINTS !!!!!!!!
alex41 [277]

this should help! i read over the article a little bit and it seems to answer your question pretty well. https://www.snap.com.au/articles/the-pros-and-cons-of-digital-and-offset-printing.html

7 0
3 years ago
What type of security software prevents, detects, and removes malware that tries to collect personal information or change compu
Lesechka [4]
Antivirus? I think is the correct answer
4 0
3 years ago
Other questions:
  • Under which tab can you find the options for reusing slides from other presentations
    5·1 answer
  • Professional photography is a competitive job field. <br> true <br> false
    12·2 answers
  • Please help! i need to answer this soon!
    13·1 answer
  • B. Does “refactoring” mean that you modify the entire design iteratively? If not, what does it mean?
    7·1 answer
  • How do i beat the final battle in lara croft: temple of osiris?
    9·1 answer
  • Create two functions to calculate the area and circumference of the circle using pointer.
    12·1 answer
  • Ict quiz I attached a picture
    11·2 answers
  • What are the similarities characteristics between computer and human beings?​
    13·2 answers
  • What is the difference between cyberbullying and bullying.
    5·2 answers
  • Which of the following is an example of effective nonverbal communication?
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!