Comment

Comment by smtddr

Is it? Seems to require about the same knowledge as the original FizzBuzz. Even if it didn't, if a candidate couldn't write the logic to determine if a number is prime or not... that's another red flag.

  def is_prime(x):
    if x%3 and x%2:
      return True
    else:
      return False

  print is_prime(4)
  print is_prime(7)
EDIT: Oops, nevermind... you're all right and I'm wrong. I'm not fixing this code so everyone can see exactly how I screwed up.
parent smtddr 12 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton