We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
import random
import ui import sound
label = ui.Label(name='Label') label2 = ui.Label(name='Label2') label3 = ui.Label(name='Label3') label4 = ui.Label(name='Label4')
def button_tapped(sender): sound.play_effect('ui:switch4') '@type sender: ui.Button'
global shows_result shows_result = False
if shows_result or label.text == 'MB': label.text = title
if label.text == 'MB':'Megabucks\n\n'+str(self.draw (1, 46, 6)) if label.text == 'MB': label2.text = str(self.draw (1, 23, 1))
class self: def init(self): draw(a)
def draw(startPosi, endPosi, interateNumber): a = random.sample(range(startPosi, endPosi), interateNumber) a.sort() return a
def make_button(title): button = ui.Button(action=button_tapped, title=title) return button
button1 = make_button(title='MB')
view = ui.load_view() view.add_subview(label) view.add_subview(label2) view.add_subview(label3) view.add_subview(label4) view.add_subview(button1) ui.load_view('Testing').present('sheet')
Can’t show result on label 1 & 2 any help
The text was updated successfully, but these errors were encountered:
Please post this in the Pythonista App Forum. Thanks!
Sorry, something went wrong.
Auf Pythonista App Forum verwiesen
No branches or pull requests
import random
import ui
import sound
label = ui.Label(name='Label')
label2 = ui.Label(name='Label2')
label3 = ui.Label(name='Label3')
label4 = ui.Label(name='Label4')
def button_tapped(sender):
sound.play_effect('ui:switch4')
'@type sender: ui.Button'
global shows_result
shows_result = False
if shows_result or label.text == 'MB':
label.text = title
if label.text == 'MB':'Megabucks\n\n'+str(self.draw (1, 46, 6))
if label.text == 'MB': label2.text = str(self.draw (1, 23, 1))
class self:
def init(self):
draw(a)
def make_button(title):
button = ui.Button(action=button_tapped,
title=title)
return button
button1 = make_button(title='MB')
view = ui.load_view()
view.add_subview(label)
view.add_subview(label2)
view.add_subview(label3)
view.add_subview(label4)
view.add_subview(button1)
ui.load_view('Testing').present('sheet')
Can’t show result on label 1 & 2 any help
The text was updated successfully, but these errors were encountered: