Group 1
Group 1
SOUTHERN PHILIPPINES
ALUBIJID / CAGAYAN DE ORO / CLAVERIA / JASAAN / OROQUIETA / PANAON
ES106a
COMPUTER FUNDAMENTALS AND PROGRAMMING
Submitted By:
DAM
Members:
Andig, Arianne
Daroy, Webster Mark
Fajardo, Miko Steven
Gulam, Nurhana
Bachelor of Science in Civil Engineering
Submitted To:
ENGR. KENNETH ADRIAN A. ABELLA
Instructor
def calculate():
length = length_entry.get()
width = width_entry.get()
if length: #check entry box
if width: #check entry box
length = float(length)
width = float(width)
choice = var.get()
if choice == 'a': #calculate area
area = length * width #formula for area
result_label.config(text = 'The total Area is ' + str(area))
elif choice == 'b': #calculate perimeter
perimeter = 2 * (length + width) #formula for perimeter
result_label.config(text = 'The total Perimeter is ' + str(perimeter))
else:
result_label.config(text='Please enter a valid width')
else:
result_label.config(text = 'Please enter a valid length')
var = StringVar()
var.set('a')
area_button = Radiobutton(root, text ='Calculate Area', variable = var, value
='a', bg='light pink')
area_button.grid(row = 2, column = 0, padx=10, pady=10)
perimeter_button = Radiobutton(root, text ='Calculate Perimeter', variable = var,
value ='b', bg='light pink')
perimeter_button.grid(row = 2, column = 1, padx=10, pady=10)
root.mainloop()
IV. Screenshots of the output
V. Documentation
a. Group members’
contributions.
Andig, Arianne
made the high-
level algorithm
program.
Daroy, Webster
Mark helped with
making the code
for the program.
Fajardo, Miko
Steven made the
flowchart of the
program.
Gulam, Nurhana helped with making the code for the program
and made the pdf and ppt file compilation.
b. Proof of Collaboration