Skip to content

Instantly share code, notes, and snippets.

def main():
import re
def write(filename, content):
with open(filename, 'a') as file:
file.write(str(content) + '\n')
fileName = input('File name to open: ')
raw = input('Values to append: ')
# User inputs
fileName = input('File name to open: ')
localMin = float(input('Low Limit: '))
localMax = float(input('High Limit: '))
# Define hFound and lFOund
highFound = 0
lowFound = 0
# Open file, and throw error if non-existant
# User inputs
fileName = input('File name to open: ')
localMin = float(input('Low Limit: '))
localMax = float(input('High Limit: '))
# Initialize variables
totalValues = 0
sumValues = 0
minValue = None
maxValue = None
@Cirilla-dev
Cirilla-dev / Prog6part2.py
Created October 17, 2025 05:41
Added coments, fixed inconsistent double vs single quotes
def main():
# User inputs
fileName = input('File name to open: ')
localMin = float(input('Low Limit: '))
localMax = float(input('High Limit: '))
# init variables
totalValues = 0
sumValues = 0
minValue = None