Question: Write a function that takes three parameters: list of symbols ( as characters ) , list of repetitions ( as positive integers ) , and
Write a function that takes three parameters: list of symbols as characters list of repetitions as positive integers and a boolean. Note that the lists can be of any length but lengths of these lists will always be the same. Your function returns a string containing characters from the symbols list repeated the corresponding number of times if the boolean parameter is True, and reversed otherwise. If both lists are empty, return an empty string. For example, Input Output Reason True is repeated times, is repeated times and everything is put together. def fourthpatternsymbols repeats, switch: fourthpattern True fourthpattern False
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
