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

 

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

Given a rational number, return its integer part. ***This is just int(x), but if we changed it to decimal part, then it would be less trivial.***


integerPart(12.9) → 12
integerPart(35) → 35
integerPart(-77.2) → -77

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

def integerPart(aNumber):

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: 150 Post-solution available

Copyright Nick Parlante 2017 - privacy