id/email
password
forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice

 

amgreyson@gmail.com algebra-1 > whatTypeLists
prev  |  next  |  chance

Given an integer as input, name the set or sets to which it belongs: natural, whole, or integer. For example, 3 would be a member of the natural, whole, and integer sets; whereas -3 would be a member of the integer set, only. Return one of the following three options as your result: ["natural", "whole", "integer"], ["whole", "integer"], or ["integer"].


whatTypeLists(77) → ['natural', 'whole', 'integer']
whatTypeLists(0) → ['whole', 'integer']
whatTypeLists(-16) → ['integer']

...Save, Compile, Run (ctrl-enter)

def whatTypeLists(anInteger):

Editor font size %:
Shorter output


Forget It! -- delete my code for this problem

Progress graphs:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Python Help

Difficulty: 125 Post-solution available

Copyright Nick Parlante 2017 - privacy