Vegetarianboy30

fizzbuzz in python lmao

Jan 20th, 2021
635
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. for i in xrange(1,101):
  2.     fizz = 'fizz' if i % 3 == 0 else ''
  3.     buzz = 'buzz' if i % 5 == 0 else ''
  4.  
  5.     output = fizz + buzz if fizz or buzz else i
  6.  
  7.     print output
RAW Paste Data