101 Run app
Instructions
Can you run a Shiny app? Navigate to the problem tab. Then click the play button to run your first app.
#| standalone: true
#| components: [viewer]
#| layout: horizontal
#| viewerHeight: 800
from shiny.express import ui, render, input
ui.input_text("name", "Type a name", value="world")
@render.text
def greeting():
return f"Hello {input.name()}!"
#| standalone: true
#| components: [editor, viewer]
#| layout: horizontal
#| viewerHeight: 800
from shiny.express import ui, render, input
ui.input_text("name", "Type a name", value="world")
@render.text
def greeting():
return f"Hello {input.name()}!"
#| standalone: true
#| components: [editor, viewer]
#| layout: horizontal
#| viewerHeight: 800
from shiny.express import ui, render, input
ui.input_text("name", "Type a name", value="world")
@render.text
def greeting():
return f"Hello {input.name()}!"
The source code for this exercise is at https://github.com/posit-conf-2024/intro-to-shiny-for-python/tree/main/docs/exercises/101-run-app.