Question: returns either a string repeated X times or the product of two numbers ( the arithmetic operation ) . Return False if second argument is

returns either a string repeated X times or the product of two numbers (the arithmetic operation). Return False if second argument is NOT a number
>>> task4("hello",3)
'hellohellohello'
>>> task4(10,3)
30
>>> task4('10',3)
'101010'
>>> task4('10','3')
False
>>> task4('hi','2')
False

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!