Welcome, Guest

Author Topic: How Many  (Read 1443 times)

vh

  • formerly mudkipz
  • *****
  • Posts: 1140
  • "giving heat meaning"
How Many
« on: June 09, 2012, 03:15:59 AM »
How many poo poo

def poo(number):
    print 'i like %s poo' %(number)
poo(5)

atomic7732

  • Global Moderator
  • *****
  • Posts: 3849
  • caught in the river turning blue
    • Paladin of Storms
Re: How Many
« Reply #1 on: June 09, 2012, 03:23:33 AM »
Output:

i like 5 poo

Python <3

But, wait, do you put the parentheses around "number" after %? I don't think that's needed. Only if you have multiple arguments.

hi = "pony "
print hi + "should " + hi * 2
« Last Edit: June 09, 2012, 03:28:04 AM by atomic7732 »

Desacabose

  • ****
  • Posts: 56
  • ?
Re: How Many
« Reply #2 on: June 09, 2012, 03:42:19 AM »
How many poo poo

def poo(number):
    print 'i like %s poo' %(number)
poo(5)

vh

  • formerly mudkipz
  • *****
  • Posts: 1140
  • "giving heat meaning"
Re: How Many
« Reply #3 on: June 09, 2012, 03:43:34 AM »
print 'pony'*2000