Turn Python functions into apps with inputs and outputs: a greeter, a calculator with several inputs, and a quiz built from a list of questions, in an in-browser stand-in for Gradio that runs the same code as the real thing.
A function plus inputs and outputs makes an app; more inputs mean more parameters, in the same order.
Turn a Python function into an app you can click, in an in-browser stand-in for Gradio that runs the same code as the real thing.
A movie-night calculator with sliders, a dropdown and two outputs: each input is a parameter, each output a returned value, all in order.
Questions as data, an input made for each one, and a function that marks the answers.
Keep a quiz's questions as data, make a Radio input for each one with a loop, and write the function that marks the answers and gives feedback.
Store each question as an object of your own class, Question, with a check method, so each question knows how to mark itself.
Progress is saved in this browser only. Nothing is sent anywhere.
For teachers: Teacher guide (notes, answers, solutions, slides and worksheets)