This repository contains a simple Python script that calculates the area of a rectangle based on user input. It was created in Visual Studio as part of ATMS 523 Assignment 1 to demonstrate basic Python functionality and GitHub workflows.
You do not need Visual Studio Code to run this script. Here's how to do it using just Python and a terminal:
- Visit the official Python website and download Python 3.x for your operating system.
- During installation, make sure to check the box that says “Add Python to PATH” (Windows only).
- Go to this GitHub repository.
- Click the green “Code” button and select “Download ZIP”.
- Extract the ZIP file to a folder on your computer.
- Windows: Press
Win + R, typecmd, and hit Enter. - macOS: Open Terminal from Applications > Utilities.
- Linux: Use your system’s terminal.
Use the cd command to move into the folder where the script is saved. For example:
``bash
cd Downloads/module-1-part-2-using-github-workflows-Key-Roberson-main
Type the following command: python Simple_code.py
Enter the length and width when asked. The script will calculate and display the area of the rectangle.
- Prompts the user to enter the length and width of a rectangle.
- Calculates the area using a simple function.
- Displays the result with formatted output.
- Includes error handling for invalid input.
Python 3 Visual Studio Code (JupyterHub environment) Git & GitHub
Created by Kiara Roberson for ATMS 523 Assignment 1.