From 6d862e6bd0b05ad08c2fdccf9dd1bb188a0304a5 Mon Sep 17 00:00:00 2001 From: dholmes4 <dholmes4@huskers.unl.edu> Date: Thu, 27 Mar 2025 16:38:59 -0500 Subject: [PATCH] Delete main.py it was something for the discrete math extra credit which i can't share with trung --- main.py | 190 -------------------------------------------------------- 1 file changed, 190 deletions(-) delete mode 100644 main.py diff --git a/main.py b/main.py deleted file mode 100644 index ea17dec..0000000 --- a/main.py +++ /dev/null @@ -1,190 +0,0 @@ - -""" -given input - { (1,1), (1,2), (2,1), (2,2) } <--- input 1 - { (1,1), (1,2), (2,1) } - { ("butt","butt"), ("head", "head"), ("beavis", "beavis") } - - anything else - use the homework 4 as a test case.... reference. - - input is put in the code becuase it's easier to mess with - why even have console interface? - -given output - CONSOLE STARTS HERE - PROGRAM START - - reflexable - For all the variables in the set there is a duplicate values in one element - * either true or false * - * elaboration * - irreflexable - for every element in the set. there is not a element duplicate: - * either true or false * - * elaboration * - Symmetric - for every variable combonation there is one with a opposite variable order - * either true or false * - * elaboration * - anti-symmetric - for every variable combonation there is NOT one with a opposite variable order - * either true or false * - * elaboration * - Asymmetric - not symmetric & IS irreflexive - * either true or false * - * elaboration * - Transative - “If ac is in there, if bc is in there then ac is in there” - * either true or false * - * elaboration * - - the program has ended please have a good day - XOXOXOXO - CONSOLE ENDS HERE - - for input 1 - CONSOLE STARTS HERE - reflexable - For all the variables in the set there is a duplicate values in one element - True - present variables: - 1 - 2 - present variables versus duplicates: - 1 : (1,1) - 2 : (2,2) - # if a duplicate wasn't prsent for a varibale it would be just "not present" like a string - irreflexable - for every element in the set. there is not a element duplicate: - False - present variables: - 1 - 2 - present variables versus duplicates: - 1 : (1,1) - 2 : (2,2) - # having "duplicate not present" on the right of the variable is a good thing. a win condtion - Symmetric - for every variable combonation there is one with a opposite variable order - True - present elements: - (1,1) - (1,2) - (2,1) - (2,2) - present elements versus their opposite order elements. (duplicates are not counted) - (1,2) : (2,1) - (2,1) : (1,2) - # might chirp out and count duplicates - # if there is a element that doesn't have a duplicate - # it will be like "(1,3) : opposite not present" - anti-symmetric - for every variable combonation there is NOT one with a opposite variable order - False - # having "opposite not present" on the right of the variable is a good thing. a win condtion - Asymmetric - not symmetric & IS irreflexive - False - Symetric? - True - irreflexive? - False - - 0 / 2 conditions met - Transative - “If ac is in there, if bc is in there then ac is in there” - * either true or false * - * elaboration * - - the program has ended please have a good day - XOXOXOXO - CONSOLE ENDS HERE - - someone needs to invent a phrase that's like one of those islam phrases that have power to uplif people's spirits -""" - -def main(): - """ - set syntax - https://www.w3schools.com/python/python_sets.asp - touple syntax - https://www.w3schools.com/python/python_tuples.asp - collection properties table - https://drive.google.com/file/d/1p5jA7IyM107CtrC3CDnv7UMxQhfrXvhf/view?usp=sharing - - naming conventions - modules & packages - snake_case - classes - CamelCase - variables - snake_case - """ - #this ia a set that contains multiple tuples. - input = { (1,1), (1,2), (2,1), (2,2) } - - print("PROGRAM START\n") - - # all variables default to false in the their functions - reflexable_boolean = getReflexableBoolean(input) - irreflexable_boolean = getIrreflexableBoolean(input) - symmetric_boolean = getSymmetricBoolean(input) - anti_symmetric_boolean = getAntiSymmetricBoolean(input) - asymmetric_boolean = getAsymmetricBoolean(input) - transative_boolean = getTransitiveBoolean(input) - -def getReflexableBoolean(input): - reflexable_boolean = False - - print("getReflexableBoolean START") - print("\t input = "+str(input) ) - - #make it a set so there's no duplicate variables - present_variables = set() - - # input is a set that contains tuples - # element is the tuples. Like (1,1) - # this nested advanced for loop detects all of the variables in the input - for element in input: - for variable in element: - if variable not in present_variables: - present_variables.add(variable) - - #machine learning professional AI monster made this line - #why even exist :-( - print("\t present variables = " + str(present_variables) ) - - number_of_present_variables = len(present_variables) - - #now that we have all the variables - # see if there's a duplicate (like (1,1) ) in the input - # craft as many tuples as there are variables in number_of_variables_present - # those tuples will consist of their corosponding varibles as a duplicate - set_of_duplicates = set() - - for variable in present_variables: - set_of_duplicates.add( (variable, variable) ) - - - exit() - - return reflexable_boolean - -if __name__ == "__main__": - main() - - - - - - - - - - - - - - - - - - - - - - - - - - -- GitLab