+ Reply Thread
#1
def multiplier(a, b):
i =0
while b:
if i > b: break
print(a, 'x', i, '=', a*I)
i += 1
#2
Not a python user so trying to analyse your code
Code:
// defines or creates a function //with parameters a and b def multiplier(a, b): // initializes a variable i to 0 i =0 // loops through b which should be a number while b: // if i (initialized above) is greater than argument b, break the loop if i > b: break // prints first argument (a) // concats it with string x and argument (I) // and carries out multiplication with argument a and i print(a, 'x', i, '=', a*I) // adds 1 to i to make the loop continuous till it breaks above i += 1

I tried Abi?
#3
You guys are trying to confuse person here o!
#4
Writing codes?
#5
Nice
#6
I am thinking writing tutorials for beginners would really be ideal to keep people here. They learn, ask questions and make references. With that, they can tempt writing and presenting codes for reviews and corrections. Starting out by pushing out codes without the basics could scare newbies away as they would think beginners don't belong here. Since we are just taking off, let's keep things a little low. #my2cents
#7
You have my gbosa. Again gbosa. Again gbosa. You are very on point.
#8
You did perfectly beautiful
#9
That is intuitive.
I was surprised that despite how popular Python is, no one was here so I just had to put something up.
#10
That was a brilliant move.
#11
i am liking this site... oya oga dhtml hope say our emojis done dey ready baaa... cos we'll be needing them soon
Back to top