Skip to content

Python scripting for everyday system engineering tasks. The goal is to automate repetitive work, speed up troubleshooting, and improve my overall proficiency with Python. This will be an ongoing project.

Notifications You must be signed in to change notification settings

JS-LinuxK8Infra/Python_Scripts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python

Python scripting for everyday system engineering tasks along with tooling I have started to work on. The goal is to automate repetitive work, speed up troubleshooting, and improve my overall proficiency with Python. This will be an ongoing project.

Table of Contents

Changelog

  • v1.0: Initial creation with uploading and documenting all scripts and code written thus far.

Scripts

These are my Python scripts. Each entry lists the name of the script and what the script does.

Basic Syntax and Variables

  1. basic_hello_world.py

Defines your name and prints a greeting.

  1. advanced_hello_world.py

Defines the variables for a hello world script, greets the user and provides a return greeting.

  1. meals.py

Defines variables for food eaten at various meals and prints what is eaten at each.

  1. integer.py

Defines variables for several integers and performs a basic calculation.

  1. basic_calculation.py

Prints a basic mathematical calculation to the terminal.

  1. exponents.py

Performs modulo calculations on several variables and prints the output to the terminal.

  1. concatenation.py

Defines multiple strings, concatenates them together and prints the output to the terminal.

  1. plus_equals.py

Defines multiple variables, adds them together, and appends the output to the end of a string on the terminal.

  1. multi_line_string.py

Defines a multi-line string and prints to the terminal.

  1. ascii_art.py

Defines ASCII art and prints symmetrically to the terminal.

  1. print_name.py

Defines a name to a VAR and prints to the terminal.

  1. first_letter.py

Selects the first letter from a name, assigns to a second variable then prints the output to the terminal.

Boolean Variables and if/elif/else statements

  1. boolean_variables.py

Defines boolean variables, prints True or False to the terminal as well as the class of variable.

  1. if_statement.py

Defines a variable, evaluates an if expression and prints the correct output to the terminal.

  1. multiple_if_statements.py

Defines multiple variables, evaluates multiple expressions, prints expected output to the terminal.

  1. and_statement.py

Defines multiple variables, evaluates an and statement, prints expected output to the terminal.

  1. or_statement.py

Defines multiple variables, evaluates an or statement, prints expected output to the terminal.

  1. not_statement.py

Defines multiple variables, evaluates a not statement, prints expected output to the terminal.

  1. else_statement.py

Defines multiple variables, evaluates an else statement, prints expected output to the terminal.

  1. else_if_statement.py

Defines multiple variables, evaluates an else if statement, prints expected output to the terminal.

  1. advanced_else_if_statement.py

Defines multiple variables, evaluates an advanced else if statement, prints expected output to the terminal.

Lists

  1. list_method.py

Defines a list, removes the final integer and prints the remainder to the terminal.

  1. list_append.py*

Defines a list, appends two additional integers, and prints the updated list to the terminal.

  1. list_elements.py

Defines a list, defines zero-indexing list position and prints out employee 3.

  1. list_negative_index.py

Defines a list, defines negative zero-indexing list position and prints out the last element.

  1. modify_list.py

Defines a list, insert elements using positive and negative indexing, print modified list to the terminal.

  1. remove_list.py

Defines a list, removes an element and prints updated list to the terminal.

  1. 2d_list.py

Create 2D list, update elements, print updated elements to the terminal.

  1. modify_2d_list.py

Create 2D list, modify elements and print output to the terminal.

  1. advanced_modify_2d_list.py

Modify 2D list via both insertion and removal of elements in customer data list, then print the updated list.

Strings

  1. string_slice.py

Creates two variables, slices a beginning range, prints the output, slices a range in the middle of a string, and prints this output to the terminal.

  1. slice_concatenate.py

Defines two variables, concatenates the preeceeding slice for each together, assigns to a new variable, and prints to the terminal.

  1. variable_slice_concatenation.py

Defines two variables, concatenates the preeceeding slice for each together with variable length slices, assigns to a new variable, and prints to the terminal.

  1. negative_indice.py

Defines two variables, grabs the last character and saves to a new variable, prints the output to the terminal, then creates another variable, and slices the last four characters, assigns them to a new variable and prints to the terminal.

  1. correct_string.py

Correct the first variable typo by creating a new variable, assigning the correct first letter, and concatenating a corrected slice of this to fix the first variable.

  1. escape_character.py

Define the variable, correct using escape charaters to address the use of quotes within a string.

  1. string_function.py

Create the function, add a for loop and increment through the letters of the string, then print the total numerator count for the string argument.

  1. string_conditional.py

Creates a function, adds if/else statement,prints the output using a Boolean value based on if/else statement.

  1. in_string.py

Creates a function, defines function check to see if the smaller string is in the larger string, then prints the result to the terminal with a boolean value as the output.

  1. advanced_strings.py

Defines a function, defines VARs that shift that slice the first three and first four letters respectivly from each string and consolodate them to generate a username which is printed to the terminal. Then, defines a second function that identifies two passwords with f-string VARs to generate a password. Outside of the second function, an additional variable is then defined which allows for the output printed to the terminal for each password the user may select to be printed to the terminal as a string in two seperate lines as opposed to printing the output as a tuple.

Code

This is the code I have written. Each program details what the program does and what the end result ended up being.

  1. loveseat_project.py

This code tracks inventory, determines a customer's order, calculates sales tax, and provides the customer with the total for their purchase including price of items purchased as well as sales tax.

  1. magic_8_ball.py

This code takes the user's name, prompts them to ask a question, executes a random number generator, and the randomly decided integer then determines the string printed to the terminal to answer their question.

  1. sals_shipping.py

This code takes the weight from a user, compares it to the available shipping options and provides the customer with the cost for each option based on the weight of what they are shipping.

  1. gradebook.py

This code details multiple subjects and grades, determine pass/fail paramaters, modify via adding and removal of grades, print updated gradebook to terminal.

Contributing

Any and all feedback is always welcome.

License

This is for personal usage and development.

Acknowledgments

All scripts and code were were worked on in Code Academy

About

Python scripting for everyday system engineering tasks. The goal is to automate repetitive work, speed up troubleshooting, and improve my overall proficiency with Python. This will be an ongoing project.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages