Answer:
Hi Rmarie! The question is asking for a simple function implementation without using a return statement. Please find the answer below.
Step-by-step explanation:
The answer is easily implemented in Python. I have used Python 2.7, and included code for user to input a movie rank when the program is run. You can paste the code below into a file called top_movie_year.py and run it from the command line as "python top_movie_year.py".
top_movie_year.py
def print_kth_top_movie_year(rank):
print(rank);
rank = raw_input("Enter movie rank: ");
try:
rank = int(rank);
while rank <= 0:
print("Input a valid number: ")
rank = raw_input("Enter a movie rank: ");
print_kth_top_movie_year(rank);
except ValueError:
print("Invalid input!");