Visual Basic and Python Programming
Assignment 2
Due no later than 11:59 PM on Sunday
Program 1. Flags (to be done in Visual Basic only)
Write a program which shows the user the flags from three countries. You can choose whichever countries you like. When the user clicks on a flag, the name of the country should be displayed in the label. You will need to use PictureBoxes to hold the images of the flags. You will probably need to choose the SizeMode property of the PictureBox and then choose Zoom to make the image fit.
Program 2. Mileage (to be done in Visual Basic AND PYTHON)
Write a program which allows the user to enter the distance they have traveled by car in miles and the number of gallons of gasoline they used to travel the distance. Be sure to allow for decimal places for both values. Your results should show miles per gallon and kilometers per gallon. A kilometer is 0.61 miles, and this value must be stored as a constant. Your outputs must be formatted to 2 decimal places.
Program 3. PushBox (to be done in Visual Basic only)
Create a program which shows four buttons, each with Text property “Push Me”. When you push one of the buttons, the button should disappear and the other three should become or remain visible. Each button has a Visible property which can be set to either True or False.