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

Python > Warmup-2 > array_front9
prev  |  next  |  chance

Given an array of ints, return True if one of the first 4 elements in the array is a 9. The array length may be less than 4.

array_front9([1, 2, 9, 3, 4]) → True
array_front9([1, 2, 3, 4, 9]) → False
array_front9([1, 2, 3, 4, 5]) → False

...Save, Compile, Run         

See also Python Example Code. Python help docs: Python Strings | Python Lists | Python If Boolean


prev  |  next  |  chance   |  CodingBat  >  Warmup-2

Forget It! -- delete my code for this problem 221.0

Copyright Nick Parlante 2006-10 - privacy