Python Forum
Inheriting, given number from randint is not working - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: Inheriting, given number from randint is not working (/thread-21749.html)



Inheriting, given number from randint is not working - beLIEve - Oct-12-2019

Hello!
This is a second try
The code from Clock and Calendar segment now works fine (lines 0 to 238)
however i'm trying to work on Weather segment (lines 240 to 344)
In this code i try to get a random int from the given range (line 305) but always gets zero from default (line 395) and after importing random gets error about statement
I want the given month to download a given range from which he will draw an interger temperature which he will enter into the list and repeat it until the list is 11 items long

I do not know how to inherit the class so that it knows which month and why it does not give a random temperature from the first element from given list

The class is realized in other script called script.rpy
I use it like this [wea.temp] but still shows zero

Please help
Sorry for Goggle translator

https://paste.ofcode.org/8D6kK493dc2By6RMhPKpcD