Problem 1: Write a function that stutters a word as if someone is struggling to read it. The first two letters are repeated twice with an ellipsis … and space after each, and then the word is pronounced with a question mark ?.
编写一个断断续续的函数,就好像有人很难读懂一个单词。前两个字母用省略号重复两遍,每个字母后面有空格,然后这个单词要用问号发音?
for example:
stutter(“incredible”) ➞ “in… in… incredible?”
stutter(“enthusiastic”) ➞ “en… en… enthusiastic?”
stutter(“outstanding”) ➞ “ou… ou… outstanding?”
def stutter(word):
word1 = word[1:3]
print('"',word1,'... ',word1,'... ',eval(word),'?','"')
## eval(word)实现了将word两端的引号去掉的功能。
st = input('please input