Write a program which asks the user for four numbers(Python)
来源:学生作业帮 编辑:百度作业网作业帮 分类:综合作业 时间:2024/07/31 11:53:23
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
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=0
oddnum=0
for i in range(0,4):
num=input("please input a number:")
if num%2==0:
oddnum+=1
else:
evennum+=1
if evennum>oddnum:
print "That there were more even numbers than odd numbers"
elif evennum<oddnum:
print "That there were more odd numbers than even numbers"
else:
print " That there were the same number of even and odd numbers"
oddnum=0
for i in range(0,4):
num=input("please input a number:")
if num%2==0:
oddnum+=1
else:
evennum+=1
if evennum>oddnum:
print "That there were more even numbers than odd numbers"
elif evennum<oddnum:
print "That there were more odd numbers than even numbers"
else:
print " That there were the same number of even and odd numbers"
Write a program which asks the user for four numbers(Python)
Write a program which asks the user for four numbers and the
Write a program which allows the user to enter a list of num
Write a program which allows the user to input a list of fiv
Write a program,which performs as the following:(java)
Enter 10numbers from the keyboard,write a program to find th
Write a program to print the first 10 Fibonacci numbers.Each
write a program to read a four digit integer and print the s
Please write four numbers _____15______50
求python大神,题目是write a program to keep track of conference att
英语翻译write a program to allow a user to do conversions betwee
Write the numbers