0

why doesn't my code work???

here is my code but the thing is it doesn't work???? class weather: def _init_(self, weather, day, month): self.wheather = wheather self.day = day self.month = month weather = weather("cloudy") day = weather("Saturday") month = weather("Feburary") print(weather.wheather) please help

13th Feb 2021, 7:54 PM
Ailana
Ailana - avatar
4 Respuestas
+ 1
Due to "wheather or weather"
13th Feb 2021, 8:00 PM
Abhay
Abhay - avatar
0
Because you are doing it all wrong , you need to provide three values to only one constructor function . a=weather("cloudy", "Saturday", " february") print(a.weather)
13th Feb 2021, 7:58 PM
Abhay
Abhay - avatar
0
But why it doesn't output anything?
13th Feb 2021, 7:59 PM
Ailana
Ailana - avatar
0
can you give me an example please?
13th Feb 2021, 8:01 PM
Ailana
Ailana - avatar