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

 

logic_squarePossible


Given one integer "oneFooters" and another integer "fiveFooters", where those represent how many 1' and 5' pieces of wood that you have, return true if it is possible to lay them all on the ground and create a square. Example: If you have fifteen 1' pieces and one 5' piece, you can create a square where each side has a length of 5'. Note: You must use all of the pieces of wood!


logic_squarePossible(3, 3) → False
logic_squarePossible(13, 5) → False
logic_squarePossible(14, 5) → False

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

def logic_squarePossible(oneFooters, fiveFooters):

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

Post-solution available

Copyright Nick Parlante 2017 - privacy