How to resolve the algorithm Check that file exists step by step in the Nanoquery programming language

Published on 12 May 2024 09:40 PM

How to resolve the algorithm Check that file exists step by step in the Nanoquery programming language

Table of Contents

Problem Statement

Verify that a file called     input.txt     and   a directory called     docs     exist.

This should be done twice:

Optional criteria (May 2015):   verify it works with:

Let's start with the solution:

Step by Step solution about How to resolve the algorithm Check that file exists step by step in the Nanoquery programming language

Source code in the nanoquery programming language

import Nanoquery.IO

def exists(fname)
	f = new(File, fname)

	return f.exists()
end

  

You may also check:How to resolve the algorithm Boolean values step by step in the ALGOL 68 programming language
You may also check:How to resolve the algorithm Sorting algorithms/Stooge sort step by step in the Racket programming language
You may also check:How to resolve the algorithm Attractive numbers step by step in the Quackery programming language
You may also check:How to resolve the algorithm Arithmetic/Complex step by step in the Free Pascal programming language
You may also check:How to resolve the algorithm Leap year step by step in the DWScript programming language