Python Forum

Full Version: Inheriting, given number from randint is not working
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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