My lab files from the CS1117 module
- average_ages
- what_is_my_name
- what_is_my_type
Error Checking
- rugby_world_cup
- maths
- seconds_calculator
- km_to_miles
- average_pace
- average_speed
- functions
- separated_input
Error Checking
- functions
- three_numbers
- seasons
- grades
- equal_numbers
- fizz_buzz
- functions
- seasons - revised
- grades - revised
- fizz_buzz - revised
- slice_reverse
- add_to_list
- functions
- while_loop
- extra
- pos_factorial
- neg_factorial
- count
- Return the number of times value occurs in the list.
- index
- Returns the first index that value occurs at in the list.
- get_value
- Returns the value at the specified index
- insert
- Adds a value to a list at a specified index value.
- value_in_list
- Checks to see if value is in the list.
- concat
- Returns a new list, which is a combination of list1 and list2.
- remove
- Returns the list with the first occurrence of value removed from list.
- is_stairs
- Tests if the inputted list s is a stairs (each number is one greater than the previous number or each number is one smaller than the previous number)
- factorial
- Takes a positive number as input and returns the factorial.
- gremlins
- Who knows?
- Snake Game
- to_english
- Takes an integer between -999 and 999 inclusive, returns that number translated to English
- sort_a_list
- Takes a list s and sorts it from smallest value to biggest value
- ascii_difference
- Returns two lists, the first with the combined ascii value of the elements at the same index number, the second list with the absolute ascii difference between each element at the same index number
Redo of Labs 3 & 4
- three_numbers
- seasons
- grades
- slice_reverse
- add_to_list
- power
- F
- reducedFeeEntitlement
- commonModules
- iter_factorial
- fizz_buzz
- removeVowels
- hailStone
- Generates the hailstone sequence of a given positive number n. If n is even, the next value is n/2. If n is odd, the next value is 3n + 1.
- hexToBinary
- Accepts a hex string and returns the corresponding binary string value.
- proteins
- Employee Steps
- tenkSteps
- mostSteps
- chooseLargest
- read_draw
- Reads lottery numbers from a file and creates a list for every draw.
- Deliveries
- del_1000
- most_del
- append_list
- client_matcher
- Reads client data from a file and finds matches for the selected client
- fractions
- fraction of C, G, T, A in the input string
- F
- F_while
- F_list_comp
- F_lambda
- F_error
- frequencies
- creates a sorted dictionary with the count of each distinct item in a sequence
- firsts
- returns the string formed from the first occurrence of each item in the input
- extract
- extracts a hidden message from a passage of text
- factorialL
- Recursive factorial
- hailStoneR
- Recursive hailstone
- chooseLargest
- Choose the largest number at each index in two lists
- chooseLargest_comp
- chooseLargest_lambda
- redact
- Redact phrases from a passage of text from a file
- Explain the function
- Rewrite to not use list comprehension
- Deck
- createDeck
- Create an abbreviated deck of cards
- shuffle
- Take a deck of cards and randomise the order
- word_count
- Returns the word that appears most often in a passage of text
- what_am_I
- Creates a dictionary from elements in a list sorted by type
- who_am_I
- Creates a dictionary from elements in a file sorted by type
- matrices
- Takes a matrix in a file and reverses rows and columns
- sum_me
- Sums up rows and columns in a matrix