New course! Every coder should learn Generative AI!
Try a free lesson0
Code coach question
Trying to solve the problem, but my solution doesn't work Tom has done pull ups every day and recorded his results. He recorded each day's results in a new line, so that each line represents each day he has done pull ups. Create a program that takes n number as input and outputs the n-th days result (starting from 0). Sample Input 4 Sample Output Day 4, 9 pull ups file = open("simple.txt", "r") n = int(input()) for line in file.readlines(n): print(line) file.close() help me please, thanks
3 Answers