以下代码的执行结果是( )。desserts = ['ice cream', 'chocolate', 'apple crisp', 'cookies'] favorite_dessert = 'apple crisp' for dessert in desserts: if dessert == favorite_dessert: print("%s is my favorite dessert!" % dessert.title())
A: Apple Crisp is my favorite dessert!
B: apple Crisp is my favorite dessert!
C: ice cream is my favorite dessert!
D: chocolate is my favorite dessert!
A: Apple Crisp is my favorite dessert!
B: apple Crisp is my favorite dessert!
C: ice cream is my favorite dessert!
D: chocolate is my favorite dessert!
举一反三
- What would the woman like for dessert? A: ice cream B: fruit C: apple pie
- 9. Would you likechocolate cake for dessert? Would you like apple pie for dessert?________________
- 关于字符串常用方法的使用,有代码如下:s='Apple is my favorite fruit.'print(s.split(' '))经分析,其输出结果是( )。 A: Apple is my favorite fruit. B: 系统报错 C: ['Apple', 'is', 'my', 'favorite', 'fruit.'] D: Appleismyfavoritefruit.
- Which of the following food not belong to dessert? A: Chocolate cake B: Ice cream C: Cheese D: Noodles
- Dessert A: apple pie B: banana pie C: strawberry pie