bsc

Comprehensive codebase and cou...
Log | Files | Refs | Activity | README | LICENSE

root / semester_2 / python / code_01.py

code_01.py (313B)


      1 # Coming back to basics after months.
      2 
      3 n = int(input("How many numbers? "))
      4 even_count = 0
      5 odd_count = 0
      6 
      7 for i in range(n):
      8     num = int(input("Enter a number: "))
      9     if num % 2 == 0:
     10         even_count += 1
     11     else:
     12         odd_count += 1
     13 
     14 print("Even numbers:", even_count)
     15 print("Odd numbers:", odd_count)
© notamitgamer • Site Built: 2026-09-05 01:53:16 UTC • git-mirror commit: c170d72 [view raw info]
Originally created with stagit • modified by notamitgamer
Forked from github.com/notamitgamer/git-mirror