Computer Science, asked by shiv9786, 6 months ago


write a python program
to read to
10 numbers from the user find sum of odd
numbers and Sum of even numbers,
count of zero's given among the 10 numbers​

Answers

Answered by sillycupid
0

Answer:

Open your Start menu and choose Python (command line).

You should get a prompt that looks like >>>.

At the moment, you’re doing everything in interactive mode in the Python interpreter. That’s where the >>> comes in. Python shows you >>> when you’re supposed to type something.

At the prompt, type the following. Use a single quote at the start and the end — it’s beside the Enter key:

print('Hello World!')

Press the Enter key.

Python runs the code you typed.

Answered by sanjayst143535
2

Answer:

numbers = (1, 2, 3, 4, 5, 6, 7, 8, 9) # Declaring the tuple

count_odd = 0

count_even = 0

for x in numbers:

if not x % 2:

count_even+=1

else:

count_odd+=1

print("Number of even numbers :",count_even)

print("Number of odd numbers :",count_odd)

Explanation:

hope it helps you

Similar questions