This forum is in archive mode. You will not be able to post new content.

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - twomakewar

Pages: [1]
1
Scripting Languages / Re: Python help
« on: October 16, 2014, 10:07:59 PM »
oh so it divides and returns only the remainder of what you input.

2
Scripting Languages / Re: Python help
« on: October 16, 2014, 07:51:58 PM »
but why use this % sign.

3
Scripting Languages / Python help
« on: October 16, 2014, 09:31:30 AM »
Hi, i'm new to programming and i was wondering if someone could explain this to me because I'm not understanding what this operand does:


heres the code:



Code: [Select]
def cube(number):
    return number ** 3


def by_three(number):
    if number % 3 == 0:
        return cube(number)
        print "This is True"
    else:
        return False
        print "This is False"



can someone explain this certain piece:

Code: [Select]
if number % 3 == 0:
- I have taken the liberty of reformatting your post. Please use ['code'] tags next time.

Pages: [1]


Want to be here? Contact Ande, Factionwars or Kulverstukas on the forum or at IRC.