题目
题目

CPT_S-355-PULLM-1-LEC Scheduled Quiz 1

单项选择题

Given the following definition of doubleEvens when you invoke it as follows what is the result?

选项
A.[2, 4, 6, 8]
B.[4, 8]
C.[1, 2, 3, 4]
D.map doesn't have enough arguments error
题目图片
查看解析

查看解析

标准答案
Please login to view
思路分析
Let's walk through how doubleEvens processes the input step by step so each option can be evaluated clearly. Option 1: "[2, 4, 6, 8]". This would be the result if we mapped x * 2 over the entire input list without filtering out odd numbers first. Since the function filters even numbers only, this would be incorr......Login to view full explanation

登录即可查看完整答案

我们收录了全球超50000道考试原题与详细解析,现在登录,立即获得答案。

类似问题

更多留学生实用工具

加入我们,立即解锁 海量真题独家解析,让复习快人一步!