Sitemap

Buildathon

3 min readOct 26, 2026

--

5 fundamental programming constructs, 22 practice problems, and the simple calculator built in Streamlit

Why Python?

Python is one of the easiest programming languages to start with. Its instructions read almost like simple English, so you spend less time fighting the rules and more time solving problems. It is free, and it is used almost everywhere; artificial intelligence, data science, websites, automation and even robotics. Learning it in first year opens many doors later.

5 constructs, 22 problems, different theme

Every program, big or small, is built from a few basic ideas called programming constructs. Our course, Python: Fundamental Programming Constructs, teaches 5 of them through 22 short problems. The five basic constructs are

  1. Variables and operations
  2. Sequence
  3. Selection
  4. Iteration
  5. Function

Variables and Operations

VO-1 Add two numbers

VO-2 Area and circumference of a circle

VO-3 All basic operations on two numbers

Sequence

SQ-1 Length, first letter, last letter

SQ-2 Three cuts of a word

SQ-3 Swap two numbers

SQ-4 How many different words

Selection

SL-1 Pass or Fail

SL-2 Weather from the temperature

SL-3 Add marks, and a new subject starts at zero

Iteration

IT-1 Numbers from 1 to n

IT-2 Sum from 1 to n

IT-3 Sum of digits

IT-4 Star triangle

IT-5 Read marks into a list

IT-6 Add one more mark and find the total

IT-7 Mark list

IT-8 Squares from 1 to n

Function

FN-1 Function that returns the larger number

FN-2 Function that totals a list of marks

FN-3 Student card

FN-4 Factorial that call itself

🧮 Building My First Calculator App Using Python and Streamlit

As a beginner in Python programming, I wanted to build a simple project to apply my programming knowledge practically. I decided to create a calculator application using Python and Streamlit.

Get HARINI S’s stories in your inbox

Join Medium for free to get updates from this writer.

Streamlit is an open-source Python framework that helps developers build interactive web applications using Python. It allows us to create a user-friendly interface without needing to write HTML, CSS, or JavaScript. “Official Streamlit documentation” (https://docs.streamlit.io/)

Project Objective

The main objective of this project is to develop a simple calculator that performs basic arithmetic operations, including:

  • Addition
  • Subtraction
  • Multiplication
  • Division

The application accepts two numbers from the user, allows them to select an operation, and displays the calculated result.

Technologies Used

  • Programming Language: Python
  • Framework: Streamlit
  • Code Editor: Visual Studio Code
  • Version Control: Git and GitHub

How the Calculator Works

The calculator follows a simple process:

1. The user enters the first number.

2. The user enters the second number.

3. The user selects an arithmetic operation.

4. The user clicks the Calculate button.

5. The application performs the selected operation and displays the result.

The program also handles division by zero to prevent an invalid calculation.

Python code

Key Features

1. User-friendly interface: Streamlit provides input fields, a dropdown menu, and a button to make the calculator easy to use.

2. Multiple arithmetic operations: Users can perform four basic mathematical calculations.

3. Error handling: The application checks whether the second number is zero before performing division.

4. Instant results: The answer appears on the web page when the user clicks the Calculate button.

Learning Outcomes

Through Buildathon, I gained practical knowledge of Python programming and improved my problem-solving skills.

1. Variables and Operations: Learned about variables, data types, arithmetic operations, and swapping numbers.

2. Strings and Lists: Practised string manipulation, word counting, storing marks, and calculating totals.

3. Conditional Statements: Used if, elif, and else to solve problems based on different conditions.

4. Loops and Functions: Practised iterations, number patterns, sum calculations, and creating reusable functions.

5. OOP and Recursion: Learned to create classes and objects and calculate factorials using recursion.

6. Problem-Solving Skills: Improved logical thinking, coding skills, debugging, and step-by-step problem-solving.

A big thank you to Ashok Bakthavatsalam and everyone at KGiSL Institute of Technology for providing us with this valuable Buildathon learning experience. It helped me strengthen my Python fundamentals, improve my problem-solving skills, and gain practical coding experience. This is just the beginning of my programming journey, and I look forward to learning and building more projects!

ashok bakthavathsalam

SATHISH RAMANUJAM

Raakeshmuthuvel

--

--