en-us es pt tr de
disabled
Back To Udemy

Sign in
English (US) Deutsch Español Français (France) Italiano 日本語 한국어 Polski Português Türkçe
  • Sign in
  • English (US) Deutsch Español Français (France) Italiano 日本語 한국어 Polski Português Türkçe
Search for solutions
Student Topics
Instructor Topics
Udemy Business Topics
Read article
Combined Results
The email address associated with your Udemy account
Do these help?
What's this?
Submit a Data Access or Deletion Request
Additional Comments
No comments provided.
This email does not match the email associated with your Udemy account.
Please check that you have entered the correct email addresses.
Udemy Business
Please let us know how this article can be improved to help resolve your question or issue. Thank you for taking the time to share your feedback.
Feedback submitted here will not create a support ticket and is not directly accessed by our support team. If you require assistance, please contact Udemy Support.
Thank you. Your feedback has been recorded.
Please enter the course URL as www.udemy.com/course/course_name. Click here for help.
Please login using the email associated with your Udemy account so we can better assist you.
I am a...
Udemy Support
Help and Support
Do any of these articles answer your question?
If they do, we can close your request
I found my answer. Close my request.
I still need help.
  1. Udemy
  2. Course Building
  3. Creating Content

How to Create a Coding Exercise

Coding exercises are an interactive tool you can add to your programming courses, so your learners can get practical coding experience. This article outlines how instructors can add a coding exercise to their course curriculum. 

Table of contents

  • Which programming languages are available?
  • How to add a coding exercise to your course curriculum
  • How to create a coding exercise
  • How to create the exercise solution and evaluation files with Udemy’s AI tool

Which programming languages are available?

Instructors can create coding exercises in various languages, some of which include C++, C#, Java, Python, Ruby, Swift, Web Development and PHP, among others. Review all the programming languages that are available for coding exercises.

How to add a coding exercise to your course curriculum

Before you can enter the exercise’s solution, the first step you’ll need to take is to add a coding exercise to your course curriculum.

1. Navigate to the Curriculum page of your course.

2. On the side, hover your cursor over the grey space within a section, where you want the exercise to be placed. Click the + icon that appears and then Coding Exercise.
Adding_a_coding_exercise.jpg

3. Enter the exercise’s title and then click Add Coding Exercise.

4. Plan and create the exercise you would like learners to solve by following the steps outlined in the section below.
choose_the_programming_language.jpg

How to create a coding exercise

Once you’ve added the coding exercise to your course curriculum, you can create the exercise by following the steps below. For advice and best practices on creating coding exercises, please review this Teaching Center resource.

1. Move your cursor to the exercise title and click on the pencil icon that appears to begin creating the exercise.

2. Select the programming language for the exercise.

3. On the Plan exercise page, re-enter the exercise title as well as its learning objective (optional) . 

4. Next, create the solution on the Author solution page. Enter the solution in full, which includes the evaluation and solution file. You can enter your own solution or select an example solution from the View examples, which can be accessed at the top of the screen.

Please note: Depending on the programming language for the exercise, you may be able to use AI as an assistive tool to help you draft the exercise solution and evaluation files. Please review the section below regarding the AI tool for more information.

view examples.png

 5. After creating the solution, clearly communicate the purpose and problem of this exercise on the Guide learners page, and author the Learner file. A Learner file is the code that is needed at the beginning to frame the exercise to keep the learner focused on the targeted skill.

6. In addition to inputting the code and solution for the exercise, you can provide related lectures, as well as hints,  which learners can revisit to get more information on how to solve the problem. 

You can also write a detailed explanation for the Instructor solution to highlight key concepts that learners can review to help comprehend the exercise and solution.

Depending on the programming language for the exercise, you can also select Run code to view the output of your code before running a test.

run code.png

7. Next, check the exercise’s solution by clicking Run tests at the bottom of the page.

run tests.png

8. If the solution is correct, click Save at the top right hand of the page, and then Publish to make the exercise accessible to learners. You can also preview the coding exercise by clicking on Preview.
save_and_publish_exercises.png

Please note: coding exercises will only appear published in the curriculum of published courses.

published_coding_exercise.jpg

If the course is not published, then a checkmark will not appear beside the coding exercise when it's been added to the curriculum.

How to create the exercise solution and evaluation files with Udemy’s AI tool

Instructors can also quickly use Udemy’s AI tool, powered by a third party LLM and made available on a limited basis, as an assistive tool to help draft the solution and evaluation files for eligible coding exercises (e.g., Python, C++, Java and Web Development).  Note that by using this functionality, you're agreeing to the additional terms.

  • Please note that currently this feature is available for only English and Spanish language coding exercises. We plan to release this feature in more languages over the coming weeks.

To create a solution or evaluation file using this AI tool, please follow the steps below:

1. After you’ve started creating a new, eligible, coding exercise following the instructions outlined above (steps 1-5), click Generate with AI at the beginning of the files section.

generate_files_with_ai.png

2. Within seconds, you will see a draft exercise, a solution, and evaluation files generated for your exercise.

3. Review carefully and make any changes. Note that by default, the exercise file (the code learners will see in the console when they begin the exercise) will match the solution file. You'll need to decide how much of the solution to keep as a starting point for your learners.

4. Click Save and then Publish.

Please note that the Generate with AI feature can be used up to 50 times, per user, within a 24 hour period. 

 

Was this article helpful?
5 out of 15 found this helpful

Related articles

  • Create a Multiple Choice Quiz
  • How to Create Assignments For Your Course
  • Instructors: How to Navigate to The Course Curriculum Page
  • Learning With Coding Exercises
  • Adding Resources to Lectures

By clicking to access Udemy’s support virtual assistant, you are agreeing to Udemy’s Terms of Use and Privacy Policy.

Contact Us

Related articles

  • Create a Multiple Choice Quiz
  • How to Create Assignments For Your Course
  • Instructors: How to Navigate to The Course Curriculum Page
  • Learning With Coding Exercises
  • Adding Resources to Lectures

By clicking to access Udemy’s support virtual assistant, you are agreeing to Udemy’s Terms of Use and Privacy Policy.

Contact Us
'instructor','coding','coding exercise','add coding exercise','create coding exercise','title:How to Create a Coding Exercise',
English (US) Deutsch Español Français (France) Italiano 日本語 한국어 Polski Português Türkçe
  • Udemy Business
  • Teach on Udemy
  • Get the app
  • About us
  • Contact us
  • Careers
  • Blog
  • Affiliate
  • Investors
  • Terms
  • Privacy policy
  • Cookie settings
  • Sitemap
  • Accessibility statement
Udemy
© 2025 Udemy, Inc.
true