Test2-Sem1-2020-REDO-V4.docx - COS10009\/COS60006 Test 2 2020 S1 REDO Assessment Details \u2022 Assessment Test 2 \u2013 Sem 1 2020 V4 REDO \u2022 Unit Codes

Test2-Sem1-2020-REDO-V4.docx - COS10009/COS60006 Test 2...

This preview shows page 1 - 4 out of 7 pages.

COS10009/COS60006 Test 2 - 2020 S1 REDO Assessment Details Assessment : Test 2 – Sem 1 2020 V4 REDO Unit Codes : COS10009 / COS60006 Duration : 2 hours in total. 90 minutes to complete, 30 minutes to submit. Student Name: Student ID: Instructions to Candidates You must complete all the questions. You must submit this test booklet to Doubtfire within 2 hours of the test becoming available. The test answers must be your own work. By submitting your answers to Doubtfire you are declaring the work as your own. Page 1 of 7
BASIC PASS SECTION Q1. Answer the following questions:a) Write code using a whileloopin the Ruby programming language that will print out the 13 times table. Your output should look as follows:Write your Ruby code here: Page 2 of 7
b) Write a Ruby function that takes a character argument called argand returnstrueif the character’s ASCII decimal value is between 65 and 122 (inclusive) and falseotherwise.Use the Ruby function call arg.ord()to obtain the decimal value of theASCII character.c)

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture