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

 

amgreyson@gmail.com > whatType
prev  |  next  |  chance

Given a rational number as input, classify it by returning its most specific subset: rational, integer, whole number, or natural number. Return one of the following four options as your result: "rational", "integer", "whole number", or "natural number".


whatType(77) → 'natural number'
whatType(-0.7) → 'rational'
whatType(-135) → 'integer'

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

def whatType(aRational):

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

Copyright Nick Parlante 2017 - privacy