Python 7 Levels, L1, Unit 7, GUI Design I

Powered By EmbedPress

Exercise 1:

import easygui
easygui.msgbox("I love Python")

Exercise 2:

import easygui as g
result = g.msgbox(msg = "I like Python so much.",title = "Show love",ok_button = "must")
print(result)

Exercise 3:

import easygui as g
flavor= g.buttonbox("Please choose your favorite flavor",title= "Icecream order system",choices= ("milk","vanilla","strawberry","Matcha"))
g.msgbox("What you choose is "+flavor+"\nplease confirm",title= "Icecream order system") 

Homework:

import easygui as g
movie = g.buttonbox("Please pick a movie.",title = "Movie Order",
            choices = ("Kubo and the Two Strings","Firefly","Car 3"))
number = g.buttonbox("How many tickets will you buy?",title = "Movie Order",
            choices = ("1","2","3"))
g.msgbox("The movie you picked is :"+movie +", Tickets: "+number,title = "Movie Order")

dahan1999

1 Comment

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Posts