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])
Option B is what i would say
if you are searching something and want a specific answer you are going to need to be specific on how you search it
Hey!
---------------------------------------------------
Definition:
A "for loop" is something used for repeating things over a list of items. For instance, a list or a dictionary.
Code:
colors = ["red", "green", "blue"]
for x in colors:
print(x)
---------------------------------------------------
Definition:
A "while loop" is is something used for carrying out a set of lines that are true.
Code:
n = 1
while i < 4:
print(n)
n += 1
---------------------------------------------------
Real-Life Example:
A real-life example would if I was a manager or boss for a company say that everyone was off a certain day. Like, if I said everyone was off for Christmas the 25th. If I had 1000 employees that would take a very long time to send an email to everyone. Instead of sending an email to everyone I can program code that uses "for loops" and "while loops" to create a message and send it to everyone.
---------------------------------------------------
Hope This Helped! Good Luck!
Answer:
The answer is cooperation
Explanation:
National Computer Corporation (NCC) employs Cynthia as an agent. NCC gives her an exclusive territory in which to sell NCC products. NCC cannot compete with her in that territory under the duty of cooperation
U can use Bluetooth connect your computer to the android. <span />