0% found this document useful (0 votes)
2 views3 pages

Visual Basic & Python Programming Tasks

The document outlines an assignment consisting of three programming tasks in Visual Basic and Python. The first task involves creating a program to display country flags, the second requires calculating mileage in both miles per gallon and kilometers per gallon, and the third task involves creating a button interface where buttons disappear when clicked. The assignment is due by 11:59 PM on Sunday.

Uploaded by

furqaankevin1
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views3 pages

Visual Basic & Python Programming Tasks

The document outlines an assignment consisting of three programming tasks in Visual Basic and Python. The first task involves creating a program to display country flags, the second requires calculating mileage in both miles per gallon and kilometers per gallon, and the third task involves creating a button interface where buttons disappear when clicked. The assignment is due by 11:59 PM on Sunday.

Uploaded by

furqaankevin1
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

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.

You might also like