← Back to team overview

pypos-devs team mailing list archive

Re: test message

 

def fizzbuzz(start, end):
    def int_to_fizzbuzz(i):
        entry = ''
        if i%3 == 0:
            entry += "fizz"
        if i%5 == 0:
            entry += "buzz"
        if i%3 != 0 and i%5 != 0:
            entry = i
        return entry

    return [int_to_fizzbuzz(i) for i in range(start, end+1)]

if __name__ == "__main__":
    start = int(input("Start Value:"))
    end = int(input("End Value:"))
    for i in fizzbuzz(start, end):
        print(i)

Joseph Finlayson
The Omega Centauri Project
www.theomegacentauriproject.com

+44 796 796 5870
+49 162 395 0220



On 14 March 2012 00:02, Luis Naranjo <luisnaranjo733@xxxxxxxxxxx> wrote:
>
>
>
>  Hello, world!
>
> --
> Mailing list: https://launchpad.net/~pypos-devs
> Post to     : pypos-devs@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~pypos-devs
> More help   : https://help.launchpad.net/ListHelp
>


References