filmov
tv
Write a Python Program to Count The Number of Even And Odd Numbers From a Series of Numbers
Показать описание
Hello Programmers, Welcome to my channel.
In this video you will learn about how to Write a Python Program to Count The Number of Even And Odd Numbers From a Series of Numbers
Python Scripts
======================
Python Functions Solved
==========================
Python Programs Solved
============================
Code
=============================
series = tuple(map(int, input("Enter Series of Numbers [Separated by Comma] : ").split(",")))
# series = (1, 2, 3, 4, 5)
even_count, odd_count = 0, 0
for item in series:
if item % 2 == 0:
even_count += 1
else:
odd_count += 1
print("Even count in series is : ", even_count)
print("Odd count in series is : ", odd_count)
Code
================================
series = (1, 2, 3, 4, 5)
even_count, odd_count = 0, 0
for item in series:
if item % 2 == 0:
even_count += 1
else:
odd_count += 1
print("Even count in series is : ", even_count)
print("Odd count in series is : ", odd_count)
Code
==============================
series = tuple(map(int, input("Enter Series of Numbers [Separated by Space] : ").split(" ")))
even_count, odd_count = 0, 0
for item in series:
if item % 2 == 0:
even_count += 1
else:
odd_count += 1
print("Even count in series is : ", even_count)
print("Odd count in series is : ", odd_count)
Keywords
=============================
#python #python3 #python_assignment #pythonprogramming #pythontutorial #pythonprojects #pythoncourse #pythonbaba #pythonforbeginners #pythonautomation #pythonbasic #pythonbeginners
In this video you will learn about how to Write a Python Program to Count The Number of Even And Odd Numbers From a Series of Numbers
Python Scripts
======================
Python Functions Solved
==========================
Python Programs Solved
============================
Code
=============================
series = tuple(map(int, input("Enter Series of Numbers [Separated by Comma] : ").split(",")))
# series = (1, 2, 3, 4, 5)
even_count, odd_count = 0, 0
for item in series:
if item % 2 == 0:
even_count += 1
else:
odd_count += 1
print("Even count in series is : ", even_count)
print("Odd count in series is : ", odd_count)
Code
================================
series = (1, 2, 3, 4, 5)
even_count, odd_count = 0, 0
for item in series:
if item % 2 == 0:
even_count += 1
else:
odd_count += 1
print("Even count in series is : ", even_count)
print("Odd count in series is : ", odd_count)
Code
==============================
series = tuple(map(int, input("Enter Series of Numbers [Separated by Space] : ").split(" ")))
even_count, odd_count = 0, 0
for item in series:
if item % 2 == 0:
even_count += 1
else:
odd_count += 1
print("Even count in series is : ", even_count)
print("Odd count in series is : ", odd_count)
Keywords
=============================
#python #python3 #python_assignment #pythonprogramming #pythontutorial #pythonprojects #pythoncourse #pythonbaba #pythonforbeginners #pythonautomation #pythonbasic #pythonbeginners