start=0 evensum=0 oddsum=0 counteven=0 countodd=0 print("Enter the upper Limit:") upperLimit=input() print print("Even numbers are:") for num in range(start, upperLimit+1): if num%2==0: evensum=evensum+num counteven=counteven+1 print(num) print print("Sum of Even numbers:") print(evensum) print print("Total number of Even numbers within the range are:") print(counteven) print print("Odd numbers are:") for num1 in range(start, upperLimit+1): if num1%2!=0: oddsum=oddsum+num1; countodd=countodd+1 print(num1) print print("Sum of Odd numbers:") print(oddsum) print print("Total number of Odd numbers within the range are:") print(countodd)