# '*' present in the print statement-PYTHON [closed]

for i in range(1,int(input())+1):
print(((10**i -1)//9)*((10**i -1)//9))
print('lol just need to fill one more line to post the question IGNORE IT')


What is the meaning of '*' in between ((10**i -1)//9) and ((10**i -1)//9) in the above print statement?

• Welcome to Code Review. Code Review is a place to help improve your code after you have successfully implemented and tested it. Questions asking for explanation of code you do not understand are off-topic for this site and will be closed. See What topics can I ask about? for reference. – L. F. Apr 11 at 7:29
• That's plain multiplication. – md2perpe Apr 11 at 10:59

Let's first look at what you are printing:

((10**i -1)//9)*((10**i -1)//9)

#that is the math task, from which you are printing the result


You asked what * means. This is the multiplication operator...

Let's look at the other things, so you get a better understanding of what is going on

result = 10**i - 1


Here you are doing 10 to the power of i and then minus one. The ** operator means to the power of...

So 2**4 means 2^4 or two to the power of four.

Then you are dividing the result of that task with 9 (result)//9 You are using // which is the floor division. This will cut of the decimal place.

The right side after the * is just the same as the first one. You multiply them with the * operator.

result = (10**i -1)//9
print( result * result ) #Multiplication


I hope that this helped you.

• Welcome to Code Review! As you may have noticed, the question is closed as being off-topic. If OP edits their post to address the problem and make their post on-topic, they make your answer moot. It is advised not to answer such questions. Protip: There are tons of on-topic questions to answer; you'll make more reputation faster if you review code in questions that will get higher view counts for being on-topic. – Sᴀᴍ Onᴇᴌᴀ Apr 16 at 17:38

** this means power , for example : 5 ** 2 which mean : 5 squared --> 25.
2 ** 7 which mean : 2 to the power of 7 -- > 128.

// this means Floor division - division that results into whole number adjusted to the left in the number line.
For example:

x = 15
y = 4
print('x / y =',x/y)   # Output: x / y = 3.75
print('x // y =',x//y) # Output: x // y = 3
print('x ** y =',x**y) # Output: x ** y = 50625
print('x * y =',x*y)   # Output: x * y = 60


Update
To be more clear : * this means multiplication operator.

Hope that helps you , Good Luck

• Welcome to Code Review! As you may have noticed, the question is closed as being off-topic. If OP edits their post to address the problem and make their post on-topic, they make your answer moot. It is advised not to answer such questions. Protip: There are tons of on-topic questions to answer; you'll make more reputation faster if you review code in questions that will get higher view counts for being on-topic. – Sᴀᴍ Onᴇᴌᴀ Apr 16 at 17:39