py: Square by repetitive addition

#Square by repetitive addition

x = 3

ans = 0

kount = x

while (kount != 0):

ans = ans + x

kount= kount – 1

print(str(x) + ‘*’ + str(x) + ‘ = ‘ +str(ans))

Advertisements

Author: rajukv

Hadoop(BigData) Architect and Hadoop Security Architect can design and build hadoop system to meet various data science projects.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s