Computer Science

Write the program with maximum three lines of code and that assigns first 5 multiples of a number to 5 variables and then print them.

Python

Python Funda

95 Likes

Answer

a = int(input("Enter a number: "))
b, c, d, e = a * 2, a * 3, a * 4, a * 5
print(a, b, c, d, e)

Output

Enter a number: 2
2 4 6 8 10

Answered By

50 Likes


Related Questions