Question: def joinedList(n): # n : positive integer # It returns the list [1,2,3,...,n-1, n, n, n-1, ...., 3,2,1] >>> joinedList(5) [1, 2, 3, 4,

def joinedList(n):
"""
# n : positive integer
# It returns the list [1,2,3,...,n-1, n, n, n-1, ...., 3,2,1]
>>> joinedList(5)
[1, 2, 3, 4, 5, 5, 4, 3, 2, 1]
>>> joinedList('5')
'Invalid input'
>>> joinedList(6.15)
'Invalid input'
>>> joinedList([2,8,[9]])
'Invalid input'
>>> joinedList(3)
[1, 2, 3, 3, 2, 1]
>>> joinedList(0)
[0]
"""
# --- YOU CODE STARTS HERE
# --- CODE ENDS HERE
def removePunctuation(txt):
"""
# txt : string
# It replaces every character that is not an alphabet letter
# into a space, and returns it.
>>> removePunctuation("I like chocolate cake!!(!! It's the best flavor..;.. for real")
'I like chocolate cake It s the best flavor for real'
>>> removePunctuation("Dots...................... many dots..X")
'Dots many dots X'
>>> removePunctuation(55)
'Invalid input'
>>> removePunctuation([3.5,6])
'Invalid input'
"""
# --- YOU CODE STARTS HERE
# --- CODE ENDS HERE

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!