Bash

Link to this challege section

Let's Echo

Write a bash script that prints the string "HELLO".


Looping and Skipping

Your task is to use for loops to display only odd natural numbers from 1 to 99 .


A Personalized Echo

Write a Bash script which accepts as input and displays the greeting "Welcome (name)".


Looping with Numbers

Use a for loop to display the natural numbers from 1 to 50.


The World of Numbers

Given two integers, and , find their sum, difference, product, and quotient.


Comparing Numbers

Given two integers, X and Y , identify whether X < Y or X > Y or X = Y.

Exactly one of the following lines: - X is less than Y - X is greater than Y - X is equal to Y


Getting Started with Conditionals

Read in one character from STDIN. If the character is 'Y' or 'y' display "YES". If the character is 'N' or 'n' display "NO". No other character will be provided as input.


More On Conditionals

Given three integers (, , and ) representing the three sides of a triangle, identify whether the triangle is scalene, isosceles, or equilateral.

  • If all three sides are equal, output EQUILATERAL.

  • Otherwise, if any two sides are equal, output ISOSCELES.

  • Otherwise, output SCALENE.


Arithmetic Operations

A mathematical expression containing +,-,*,^, / and parenthesis will be provided. Read in the expression, then evaluate it. Display the result rounded to decimal places.


Compute the Average

Given N integers, compute their average, rounded to three decimal places.


Functions and Fractals - Recursive Trees - Bash!

This challenge involves the construction of trees, in the form of ASCII Art.

We have to deal with real world constraints, so we cannot keep repeating the pattern infinitely. So, we will provide you a number of iterations, and you need to generate the ASCII version of the Fractal Tree for only those many iterations (or, levels of recursion).

Last updated

Was this helpful?