• en

Coding Exercise

Introduction

Coding exercises are a great way to enable your students to “learn by doing” and thereby increase engagement on your courses significantly. Programming course publishers can use this guide to create coding exercises for their students. Use the Coding Exercise Editor form to define programming exercises that automate the testing of your students’ code.

Udemy Guide to Creating Coding Exercises

  • A Sample Exercise
  • Strategies For Checking Student Code
    • Checking Javascript Code
      • Check if a variable has been declared
      • Check if a variable has been assigned a numerical value
      • Check if a variable refers to an array
      • Check if a variable is an object
      • Check if a specific function has been declared
      • Check the number of parameters accepted by a function
      • Check the size of an array
      • Check if an object contains a specific property
      • Check messages logged to the console
    • Checking HTML Code
      • Check if a specific HTML tag has been created
      • Check the text inside a tag
      • Check if an element has a specific child
      • Check if two siblings are placed adjacently
      • Check an element’s id
    • Checking CSS Code
      • Check if a specific style has been applied to an element
      • Check if a specific style is associated with any element
      • Reference Exercises
  • Javascript Exercises
    • Simple variable declaration and assignment (numerical value)
    • Simple variable declaration and assignment (string value)
    • Declaring and assigning multiple variables
    • Simple function with a single parameter
    • Simple function with multiple parameters
    • Complex conditions with if…else if
    • Create a local variable
    • Declare an array of numeric literals
    • Access elements in an array
    • Create a Simple Object
    • Invoke a function
    • For loop
    • Print to the console
    • Concatenate multiple strings
    • Access elements of an array
    • Splitting, sorting, and joining in Javascript
  • HTML Exercises
    • Create an HTML paragraph element
    • Create a title
    • Create a hyperlink
    • Add an image to a webpage
    • Wrap an element With a hyperlink
    • Create an ordered list
    • Create an unordered list
    • Add an HTML comment
    • Create an empty heading
    • Create a heading with text
    • Add a style element
    • Create a clickable button
    • Use the fieldset element in forms
  • CSS Exercises
    • Create an inline style
    • Add a simple inline style to an element
    • Create a simple style in the stylesheet
    • Create an id for an element
    • Set the background color of the body element
    • Define a style to set the font color
    • Define a style to remove underlines from all hyperlinks
    • Define a style to set the padding for a specific class
    • Create a style for a nested element
    • Create a style using an adjacent selector
    • Create a sticky footer