0

!!!Please Help!!** Property Values python core problem

79.2 Practice python core. im stuck at this practice because it says type error ive copied the solution and done everything i can if someone can help me or give me the code i need it really help because im stuck at this.

18th Oct 2022, 1:34 PM
Joshua James
Joshua James - avatar
5 Réponses
+ 7
task description: Properties Complete the provided code by creating an isEven property, which returns True if the value is even, and False if the value is odd. class Number: def __init__(self, num): self.value = num x = Number(int(input())) print(x.isEven) Use the modulo operator % to check if the value is even or odd. The value is even if the remainder of dividing it by 2 is 0.
18th Oct 2022, 3:57 PM
Lothar
Lothar - avatar
+ 7
Riya , self.value stores the input number
18th Oct 2022, 8:33 PM
Lothar
Lothar - avatar
+ 3
Oh okay thank you Lothar ☺️
19th Oct 2022, 12:49 AM
Riya
Riya - avatar
+ 2
Lothar , In self.value what value stored
18th Oct 2022, 5:34 PM
Riya
Riya - avatar
+ 1
Can you copy the task description and post it here? Then, copy your code attempt, put it into the code playground and add that here too.
18th Oct 2022, 3:46 PM
Ausgrindtube
Ausgrindtube - avatar