0% found this document useful (0 votes)
14 views4 pages

Group 1

The document outlines a performance task for a Computer Fundamentals and Programming course, detailing a program that calculates the area and perimeter of a parallelogram. It includes the program's description, required inputs and outputs, Python code, and contributions from group members. Additionally, it features a flowchart and documentation of collaboration among the team members.

Uploaded by

gulam.nurhana1
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)
14 views4 pages

Group 1

The document outlines a performance task for a Computer Fundamentals and Programming course, detailing a program that calculates the area and perimeter of a parallelogram. It includes the program's description, required inputs and outputs, Python code, and contributions from group members. Additionally, it features a flowchart and documentation of collaboration among the team members.

Uploaded by

gulam.nurhana1
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
You are on page 1/ 4

UNIVERSITY OF SCIENCE AND TECHNOLOGY OF

SOUTHERN PHILIPPINES
ALUBIJID / CAGAYAN DE ORO / CLAVERIA / JASAAN / OROQUIETA / PANAON

ES106a
COMPUTER FUNDAMENTALS AND PROGRAMMING

Performance Innovative Task


Final Term

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

I. Description of the Program


Area and Perimeter Calculator
This program calculates the area and perimeter of a
parallelogram, depending on the choice of the user.
a. What is/are the input(s) needed?
- the value of length and width
b. What is/are the outputs?
- area or perimeter
c. What are the functions or Python keywords used in the
program?
- if else
- if elif
- from “tkinter” import*
- from “name” import*
- def calculate ():

II. Flowchart of the Program

III. Python programming syntax code


from tkinter import *
root = Tk()
root.title('Area and Perimeter Calculator') #title
root.configure(bg='light pink') #background color
root.geometry("300x230") #size

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')

width_label = Label(root, text ='Enter the length: ', bg='light pink')


width_label.grid(row = 0, column = 0, padx=10, pady=10)
length_entry = Entry(root)
length_entry.grid(row = 0, column = 1, padx=10, pady=10)

width_label = Label(root, text ='Enter the width: ', bg='light pink')


width_label.grid(row = 1, column = 0, padx=10, pady=10)
width_entry = Entry(root)
width_entry.grid(row = 1, column = 1, padx=10, pady=10)

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)

convert_button = Button(root, text = 'Calculate', command = calculate)


convert_button.grid(row = 3, columnspan = 2, padx=10, pady=10)

result_label = Label(root, text = ' ')


result_label.grid(row = 4, columnspan = 2, 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

You might also like