CBSE Class 11 Computer Science Question 96 of 106

Python Fundamentals — Question 5

Back to all questions
5
Question

Question 5

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.

Solution
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
Answer