Computers and Technology
Computers and Technology, 08.02.2021 21:00, itsbabyc

Def list_val(): my_list = []
n = int(input())
for i in range(n):
my_list. append(int(input()))

def is_list_even():
for i in range(len(my_list)):
if my_list[i] % 2 != 0:
return False
return True

def is_list_odd():
for i in range(len(my_list)):
if my_list[i] % 2 == 0:
return False
return True

if is_list_even():
print('all even')
elif is_list_odd():
print('all odd')
else:
print('not even or odd')

list_val()

Why am I not able to call my other functions
is_list_even()
is_list_odd()

answer
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 09:40, cutybrain6054
Sarah is having a hard time finding a template for her advertising business that she may be able to use at a later date and also make it available to her colleagues
Answers: 1
image
Computers and Technology, 23.06.2019 05:30, savyblue1724707
Sally is editing her science report about living things. she needs to copy a paragraph from her original report. order the steps sally needs to do to copy the text to her new document.
Answers: 1
image
Computers and Technology, 23.06.2019 15:30, Dweath50
The processing of data in a computer involves the interplay between its various hardware components.
Answers: 1
image
Computers and Technology, 23.06.2019 22:00, rocksquad9125
Take a critical look at three gui applications you have used—for example, a spreadsheet, a word-processing program, and a game. describe how well each conforms to the gui design guidelines listed in this chapter.
Answers: 3
Do you know the correct answer?
Def list_val(): my_list = []
n = int(input())
for i in range(n):
my_list. append(...

Questions in other subjects:

Konu
Mathematics, 13.09.2020 14:01
Konu
Mathematics, 13.09.2020 14:01
Konu
Health, 13.09.2020 14:01
Konu
English, 13.09.2020 14:01
Konu
Mathematics, 13.09.2020 14:01
Konu
Physics, 13.09.2020 14:01
Konu
Biology, 13.09.2020 14:01
Konu
Mathematics, 13.09.2020 14:01
Konu
Mathematics, 13.09.2020 14:01
Konu
Mathematics, 13.09.2020 14:01