Ask Question

Write a method called multiconcat that takes a string and an integer as parameters. return a string that consists of the string parameter concatenated with itself count times, where count is the integer parameter. for example, if the parameter values are "hi" and 4, the return value is "hihihihi". return the original string if the integer parameter is less than 2

+5
Answers (1)
  1. 19 July, 15:49
    0
    Def multiconcat (string, number):

    retString = ""

    for i in range (number):

    retString + = string

    return (retString)
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “Write a method called multiconcat that takes a string and an integer as parameters. return a string that consists of the string parameter ...” in 📗 Computers & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers