Skip to content
This repository was archived by the owner on Feb 23, 2021. It is now read-only.
/ CS1117 Public archive

Introduction to Programming

Notifications You must be signed in to change notification settings

cnrooofx/CS1117

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CS1117

My lab files from the CS1117 module

Semester 1

Lab 1

  • average_ages
  • what_is_my_name
  • what_is_my_type

Error Checking

Lab 2

  • rugby_world_cup
  • maths
    • seconds_calculator
    • km_to_miles
    • average_pace
    • average_speed
  • functions
    • separated_input

Error Checking

Lab 3

  • functions
    • three_numbers
    • seasons
    • grades
    • equal_numbers
    • fizz_buzz

Lab 4

  • functions
    • seasons - revised
    • grades - revised
    • fizz_buzz - revised
    • slice_reverse
    • add_to_list

Lab 5

  • functions
    • while_loop
  • extra
    • pos_factorial
    • neg_factorial

Lab 6

  • 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.

Lab 7

  • 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?

Lab 8

  • Snake Game

Labs 9 & 10 - Continuous Assessment

  • 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

Semester 2

Lab 1

Redo of Labs 3 & 4

  • three_numbers
  • seasons
  • grades
  • slice_reverse
  • add_to_list

Lab 2

  • power
  • F
  • reducedFeeEntitlement
  • commonModules
  • iter_factorial
  • fizz_buzz

Lab 3

  • 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

Lab 4

  • 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

Continuous Assessment 1

  • 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

Lab 5

  1. factorialL
  • Recursive factorial
  1. hailStoneR
  • Recursive hailstone
  1. chooseLargest
  • Choose the largest number at each index in two lists
    • chooseLargest_comp
    • chooseLargest_lambda
  1. redact
  • Redact phrases from a passage of text from a file
  1. Explain the function
  2. Rewrite to not use list comprehension
  3. Deck
  • createDeck
    • Create an abbreviated deck of cards
  • shuffle
    • Take a deck of cards and randomise the order
  1. word_count
  • Returns the word that appears most often in a passage of text

Continuous Assessment 2

  1. what_am_I
  • Creates a dictionary from elements in a list sorted by type
  1. who_am_I
  • Creates a dictionary from elements in a file sorted by type
  1. matrices
  • Takes a matrix in a file and reverses rows and columns
  1. sum_me
  • Sums up rows and columns in a matrix

About

Introduction to Programming

Resources

Stars

Watchers

Forks

Languages