Write python programming even and odd number in series
Answers
Answered by
5
Even numbers in series
"""
The sequence which is generated from a pattern of dots which form a triangle is known as Triangular Number Sequence.
"""
n = 5 # size
for x in range(1, n + 1):
num = (x * (x + 1)) // 2
print(" " + str(num), end="")
"""
OUTPUT:-
1 3 6 10 15
Odd Numbers in series
"""
n = 5 # limit or size
for x in range(1, n + 1):
print(" " + str(2 * x - 1), end="")
"""
OUTPUT:-
1 3 5 7 9
"""
Answered by
0
Explanation:
oekwlwlwlwjoeowkjelwkwkekek
Similar questions
Social Sciences,
2 months ago
Science,
6 months ago
Hindi,
6 months ago
Science,
11 months ago
English,
11 months ago