title: How to use random with button in Kivy
body: <p>I just want to have 2 buttons in my KIVY APP.</p>
  
  <p>One with text "Hello" and other having a random number from 0-9.</p>
  
  <p>My code</p>
  
  <pre><code>#!/usr/bin/kivy
  import kivy
  kivy.require('1.7.2')
  
  from random import random
  from kivy.app import App
  from kivy.lang import Builder
  from kivy.uix.screenmanager import ScreenManager, Screen
  from kivy.uix.gridlayout import GridLayout
  from kivy.uix.button import Button
  from random import random
  
  Builder.load_string("""
  &lt;Highest&gt;:
      r1c1: "hello"
      r1c2: random.randrange(10)
      GridLayout:
          cols: 1
          Button:
              text: root.r1c1
          Button:
              text: root.r1c2
  """)
  
  class Highest(Screen):
      pass
  
  
  # Create the screen manager
  sm = ScreenManager()
  sm.add_widget(Highest(name='Highest'))
  
  class TestApp(App):
  
      def build(self):
          return sm
  
  if __name__ == '__main__':
      TestApp().run()
  </code></pre>
  
  <p>My code works if I just have one button with text - <em>Hello</em>. Random seems not working.</p>