Write a program called p3.py that contains a function called reveal_recursive() that takes a word (string) and the length of the word (int) as input and has the following functionality: 1. prints the...


Write a program called p3.py that contains a function called reveal_recursive() that takes

a word (string) and the length of the word (int) as input and has the following functionality:

1. prints the word where all characters are replaced by underscores

2. continue to print the word revealing one character at a time. i.e., the second line printed should print the first character followed by “_”’s representing the rest of the word. (see example below)

3. the function should end after printing the entire word once.

4. This function should be recursive


Example:

#the word is kangaroo

________

k_______

ka______

kan_____

kang____

kanga___

kangar__

kangaro_

kangaroo



Jun 09, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here