Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
Thread: Python noob and numbers
11-03-2013, 01:19 PM #1
- Join Date
- Sep 2010
- Thanked 0 Times in 0 Posts
Python noob and numbers
Have only just started learning Python and to practice what i have learned so far i wrote this:
#!/usr/bin/python i = 'Skype' j = 46,178,617 x = 'VOIP' Z = "Making it a market leader in it's field." print "%s is an online %s product." % (i, x) print "It has over %d million regular user's daily." % j print "Making %s a market leader in it's field." % i
Skype is an online VOIP product.
Traceback (most recent call last):
File "./more_practice.py", line 8, in <module>
print "It has over %d million regular user's daily." % j
TypeError: not all arguments converted during string formatting
I am convinced that the problem is down to the variable, j = 46,178,617 because it is such a large number. So could someone tell me how i can display the contents of the variable correctly please.