Laboratory work, assignment work and mid-semester tests in the introductoryįirst year Python programming course (COSC121), which has around 650 students in the first semester and 350 in the second, are all assessed using CodeRunner questions. However, it is also possible to configure CodeRunner questions so that the mark is determined by how many of the tests the code successfullyĬodeRunner has been in use at the University of Canterbury for over seven years, running millions of student quiz question submissions in Python, C, JavaScript, PHP, Octave and Matlab. Is able to solve successfully and then secondarily by how many submissions the student makes on each question. The mark for a set of questions in a quiz is then determined primarily by which questions the student In the typical 'all-or-nothing' mode, all test cases must pass if the submission is to be awarded any marks. Regardless of the behaviour chosen for a quiz, CodeRunner questions always run in an adaptive mode, in which students can click a Check button to see if their code passes the tests defined in the question. CodeRunner questions have also been used in other areas of computer science and engineering to grade questions in which many different correct answers are possible and a program must be That code is then graded by running it in a series of tests. By far the most common use of CodeRunner is in programming courses where students are asked to write program code to some specification and The area of the rectangle is 20000.00cm^2Įnter the base of the rectangle in centimetres: 15Įnter the height of the rectangle in centimetres: 1Įnter the height of the rectangle in centimetres: 0Įnter the base of the rectangle in centimetres: 25Įnter the height of the rectangle in centimetres: 2.CodeRunner is a Moodle question type that allows teachers to run a program in order to grade a student's answer. ]]>Ġ, 0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50Įnter the base of the rectangle in centimetres: 10Įnter the height of the rectangle in centimetres: 10Įnter the base of the rectangle in centimetres: 12.5Įnter the height of the rectangle in centimetres: 5.5Įnter the base of the rectangle in centimetres: 0Įnter the base of the rectangle in centimetres: 100Įnter the height of the rectangle in centimetres: 200 Note: The two values entered can be floating point values and will be valid non-negative numbers. Refer to the example testcases below for the required prompts and format of the message to be displayed with the rectangle area. The program should then print the area of the rectangle to two decimal places. A rectangle's area can be calculated using the following formula: $$ area = base * height $$ Write a program that prompts the user to enter the base and height of a rectangle in centimetres. Qtype = "coderunner " coderunnertype = "python3_w_input " tags = Įxample = true display = "SHOW " testcode = ''' ''' stdin = '''10 10 ''' expected = '''Enter the base of the rectangle in centimetres: 10 Enter the height of the rectangle in centimetres: 10 The area of the rectangle is 100.00cm^2 '''Įxample = true display = "SHOW " testcode = ''' ''' stdin = '''12.5 5.5 ''' expected = '''Enter the base of the rectangle in centimetres: 12.5 Enter the height of the rectangle in centimetres: 5.5 The area of the rectangle is 68.75cm^2 '''Įxample = false display = "SHOW " testcode = ''' ''' stdin = '''0 10 ''' expected = '''Enter the base of the rectangle in centimetres: 0 Enter the height of the rectangle in centimetres: 10 The area of the rectangle is 0.00cm^2 '''Įxample = false display = "SHOW " testcode = ''' ''' stdin = '''100 200 ''' expected = '''Enter the base of the rectangle in centimetres: 100 Enter the height of the rectangle in centimetres: 200 The area of the rectangle is 20000.00cm^2 '''Įxample = false display = "SHOW " testcode = ''' ''' stdin = '''15 1 ''' expected = '''Enter the base of the rectangle in centimetres: 15 Enter the height of the rectangle in centimetres: 1 The area of the rectangle is 15.00cm^2 '''Įxample = false display = "SHOW " testcode = ''' ''' stdin = '''0 0 ''' expected = '''Enter the base of the rectangle in centimetres: 0 Enter the height of the rectangle in centimetres: 0 The area of the rectangle is 0.00cm^2 '''Įxample = false display = "HIDE " testcode = ''' ''' stdin = '''25 2.5 ''' expected = '''Enter the base of the rectangle in centimetres: 25 Enter the height of the rectangle in centimetres: 2.5 The area of the rectangle is 62.50cm^2 '''
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |