Python Forum
Print name N times using recursion
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Print name N times using recursion
#7
Eliminate the for loop, add a parameter to fnc() that will be the counter. In the function increment the counter, print the name, do a test to see if the parameter is now 5, and call fnc(x) again if it is not.

Will guide but not write your homework assignment
Reply


Messages In This Thread
Print name N times using recursion - by ift38375 - Oct-23-2019, 05:11 AM
RE: Print name N times using recursion - by buran - Oct-23-2019, 05:34 AM
RE: Print name N times using recursion - by jefsummers - Oct-23-2019, 03:03 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
Question Recursion and permutations: print all permutations filling a list of length N SantiagoPB 6 3,494 Apr-09-2021, 12:36 PM
Last Post: GOTO10
  GCF function w recursion and helper function(how do i fix this Recursion Error) hhydration 3 2,647 Oct-05-2020, 07:47 PM
Last Post: deanhystad
  Find how many times a user played an artist and how many times disruptfwd8 1 2,675 May-04-2018, 08:32 AM
Last Post: killerrex

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020