ITECH1400 Fundamentals of Programming

  • Subject Code :  

    ITECH1400

  • Country :  

    AU

  • University :  

    Federation University

Answer:-

Task 1:

PseudoCode: thue_morse

  • Get the input parameter n
  • Declare an empty array arr[]
  • Insert the base value for 0 with ‘0’ in array
  • Initialize count to 1
  • While the count <= n
    • Calculate the negation for arr[count-1] and append the output to arr[count-1] value
    • Insert the value into the arr[] at index = count
    • Increment the count value by 1
  • endwhile
  • Return the array[n]

Task 2:

PseudoCode: square_free

  • Get the input parameter n
  • Declare an empty array arr[]
  • Insert the base value for 0 with ‘1’ in array
  • Initialize count to 1
  • While the count <= n
    • Fetch the array[count-1] and initialize to previous_value
    • Declare and initialize current_value = ‘’
    • Declare and initialize position_value = 1
    • For x = previous_value[0]  to end of string
      • if position_value % 2 == 1
        • Fetch the value from get_value_for_input_for_odd_position(x) method and append to the current_value
      • else
        • Fetch the value from get_value_for_input_for_even_position(x) method and append to the current_value
      • endif
      • Increment the position_value by 1
    • endfor
    • Increment the count value by 1
    • Insert the current_value to array[] at index = count
  • endwhile
  • Return the array[n]

Task 3:

PseudoCode: count_squares

  • Get the parameter input_string
  • Declare and initialize count to 0
  • Declare and initialize squares_count to 0
  • Find input_string length and assign to string_length variable
  • While the count < string_length
    • Declare and initialize position = count + 1
    • For i = 0 to string_length
      • Initialize position_new = i + position
      • if position_new < string_length
        • If substring of input_string with starting and ending indexes (i : position_new) is equal to substring of input_string with indexes (position_new : position_new + position)
          • Increment squares_count by 1
        • endif
      • endif
    • endfor
  • endwhile
  • Return the squares_count

Looking for academic assignment samples online? Need professional paper writers to back you up with advanced resources and other addons? Here we are! MyAssignmenthelp.co.uk takes up the responsibility to provide you with the following backups every time, on the move. 

  • Free samples 
  • Signup bonus 
  • Seasonal discounts 
  • Free access to blogs & more 

So, now that you are aware of our potential and the numerous perks that we have got in store for you, take a smart call. Our assignment help services in the UK shall make sure to help you secure a straight A+ every semester.

Why Student Prefer Us ?
Top quality papers

We do not compromise when it comes to maintaining high quality that our customers expect from us. Our quality assurance team keeps an eye on this matter.

100% affordable

We are the only company which offers qualitative and custom assignment writing services at low prices. Our charges will not burn your pocket.

Timely delivery

We never delay to deliver the assignments. We are very particular about this. We assure that you will receive your paper on the promised date.

Round the clock support

We assure 24/7 live support. Our customer care executives remain always online. You can call us anytime. We will resolve your issues as early as possible.

Privacy guaranteed

We assure 100% confidentiality of all your personal details. We will not share your information. You can visit our privacy policy page for more details.

Upload your Assignment and improve Your Grade

Boost Grades