5:python Loops
python loops
Given an integer, , print its first multiples. Each multiple (where ) should be printed on a new line in the form: n x i = result.
Input Format
A single integer, .
Constraints
Output Format
Print lines of output; each line (where ) contains the of in the form:
n x i = result.
solution:
#!/bin/python3
import math
import os
import random
import re
import sys
if __name__ == '__main__':
n = int(input())
#n = int(input().strip())
for i in range(1,11):
print(n,'x',i,'=',n*i)
Comments
Post a Comment