Answer:
Explanation:
iname=input("Enter the file name: ")
inputfile=open(iname,'r')
lines=[]
for line in inputfile:
lines.append(line)
inputfile.close()
print("The file has ",len(lines)," lines")
while True:
linenumber=int(input("Enter the line number or 0 to quit: "))
if linenumber==0:
break
elif linenumber > len(lines):
print("Error: line number must be less than ", len(lines))
else:
print(linenumber, " : ", lines[linenumber - 1])
Answer: what is the question
Explanation:
Answer:
The Ribbon is composed of three parts: Tabs, Groups, and Commands.
Answer:
The required code is given below:
Explanation:
public class Minimum {
public static Comparable min(Comparable[] values) {
if (values == null || values.length == 0) {
return null;
} else {
Comparable minValue = values[0];
for (int i = 0; i < values.length; i++) {
if (values[i].compareTo(minValue) < 0) {
minValue = values[i];
}
}
return minValue;
}
}
}