शुरू करेंमुफ़्त में शुरू करें

If-else practice

Conditional statements will come up in your code in lots of places, so its really important you are comfortable with them.

In the following samples you are writing little pieces of code to:

  1. Find the absolute value of a number
  2. Find the maximum value of two numbers
  3. Print a message if your script has finished

The variables you need to complete these examples, x, y, and finished are available in your environment.

यह अभ्यास पाठ्यक्रम का हिस्सा है

Introduction to Julia

पाठ्यक्रम देखें

इंटरैक्टिव व्यावहारिक अभ्यास

इस अभ्यास को इस नमूना कोड को पूरा करके आज़माएँ।

# Print x if it is positive, otherwise print -x
____
	println(x)
____
	println(-x)
____
कोड संपादित करें और चलाएँ