Write a program which asks the user for four numbers(Python)
问题描述:
Write a program which asks the user for four numbers(Python)
1) Write a program which asks the user for four numbers and then tells them one of the following:
· That there were more even numbers than odd numbers
· That there were more odd numbers than even numbers
· That there were the same number of even and odd numbers
答
evennum=0oddnum=0for i in range(0,4): num=input("please input a number:") if num%2==0: &...