1. Engineering
  2. Computer Science
  3. 5 question no5 the operator will not work when applied...

Question: 5 question no5 the operator will not work when applied...

Question details

[5] Question No.5: The operator will not work when applied to two strings. Try to evaluate aaa bbb and see what happens. However, it will work when applied to a string and a number (e.g. aaa 5). Explain what it does when a string and a number are given. What are the limitations on the number? Will this work with any possible number? Now in Python interactive mode or PyCharm IDE, write a function named string star, which takes two arguments: the first one is a string and the second one is an integer. Then, this function will return two objects: one is the string after utilizing the operator with the given number, and the other one is the length of the resultant string. Write proper Python command to call this function with pr proper variable names and print them, when you call your function. oper named inputs. Make sure to assign two resultant objects to two one string*#
Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution