In [3]:
import ipywidgets as wg
from IPython.display import display
import numpy as np
In [9]:
Title = wg.HTML(value="<br><b>Enter properties:</b>")
display(Title)

#------------------

tab = wg.Label('',               layout=wg.Layout(width='3%'))
L0  = wg.Label('Some quantity:', layout=wg.Layout(width='30%'))
R0  = wg.Text(value='100',       layout=wg.Layout(width='20%'))

box0 = wg.HBox([tab, L0, R0])
display(box0)

#------------------

L1 = wg.Label('Some radio buttons:', layout=wg.Layout(width='30%'))
R1 = wg.RadioButtons(options=['dog', 'cat', 'pig', 'cow', 'snake'], value='dog', 
                                     layout=wg.Layout(width='20%'))

box1 = wg.HBox([tab, L1, R1])
display(box1)

#------------------

L2 = wg.Label('Dropdown box:', layout=wg.Layout(width='30%'))
R2 = wg.Dropdown(options=['BYU','USU','Utah','UVU'], value='BYU', 
                           layout=wg.Layout(width='30%'),
                           description='', button_style='') 

box2 = wg.HBox([tab, L2, R2])
display(box2)

#------------------

submitButton = wg.Button(description='Submit and Run', button_style='success')

display(submitButton)

def buttonClicked(sbutton):
    res0.value = f"The value of R0 is {R0.value}"
    res1.value = f"The value of R1 is {R1.value}"
    res2.value = f"The value of R2 is {R2.value}"
    
submitButton.on_click(buttonClicked)

#------------------

Results = wg.HTML(value="<br><b>Results:</b>")
display(Results)

res0 = wg.Label('', layout=wg.Layout(width='55%'))
res1 = wg.Label('', layout=wg.Layout(width='55%'))
res2 = wg.Label('', layout=wg.Layout(width='55%'))

display(res0, res1, res2)
In [ ]: