Created
February 20, 2019 09:52
-
-
Save roy4801/437caa311f3515d0a383441ecb26443f to your computer and use it in GitHub Desktop.
9 x 9
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def main(): | |
for i in range(1, 10): | |
for j in range(1, 10): | |
print('{} * {} = {}'.format(i, j, i*j)) | |
print('') | |
print('--------------------------------------------------------------------------', end='\n\n') | |
for i in range(1, 10): | |
for j in range(1, 10): | |
print('{:1} * {:1} = {:2} '.format(i, j, i*j), end='') | |
print() | |
print('') | |
print('--------------------------------------------------------------------------', end='\n\n') | |
s = 1 | |
while s < 9: | |
for i in range(1, 10): | |
for j in range(3): | |
print('{:1} * {:1} = {:2} '.format(s+j, i, (s+j)*i), end=' ') | |
print('') | |
print('') | |
s += 3 | |
print('--------------------------------------------------------------------------', end='\n\n') | |
if __name__ == '__main__': | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment