Home /
Expert Answers /
Computer Science /
how-do-i-solve-this-in-python-nbsp-1-write-a-function-called-34-quote-this-34-that-accepts-two-2-pa714
(Solved): How do I solve this in python?
1 #Write a function called "quote_this" that accepts two 2 ...
How do I solve this in python?
1 #Write a function called "quote_this" that accepts two 2 #strings as arguments: a string representing a quote and 3 #a string of a name. The function should return a new 4 #string with the quote surrounded by quotation marks (") 5 #followed by a dash and the given name. For example: 6 # \( 7 \# \mathrm{\# a}= \) quote this ("Try and fail, but never fail to try.", 8 #"Jared Leto") 9 #print(a) 10 # 11 #Will print: 12 #"Try and fail, but never fail to try." -Jared Leto 14 #If the code were to continue, this: 15 # 16 #b = quote_this(a, "Michael scott") 17 #print(b) 18 # 20 #""Try and fail, but never fail to try." - Jared Leto" 21 #-Michael scott 22 24 #Write your function here! 25 def quote_this \( (a, b) \) : 26 27 29 #Below are some lines of code that will test your function. 30 #you can change the value of the vamiable(s) to test your 31 #function with different inputs. 32 # 33 4If your function works comectly, this will originally 34 #print the same output as the examples above. 35 a = quote_this ("Try and fail, but never fail to try.", "Jared Leto") 36 print(a) \( 37 b= \) quote this(a, "Michael scott") 38 print(b) 39