1. Home
  2. /
  3. Falcon
  4. /
  5. Prime Checker

Prime Checker - Falcon Typing CST Test

Loading…

Prime Checker — Falcon Code

Checks if a number is prime.

func isPrime(n) {
	if n < 2 { return false }
	for i in 2..n-1 {
		if n % i == 0 { return false }
	}
	return true
}
print(isPrime(13))

Falcon Language Guide

Falcon is a high-level, multi-paradigm programming language designed for scripting, automation, and rapid application development. It supports procedural, object-oriented, and functional programming paradigms and offers dynamic typing, automatic memory management, and cross-platform support.

Primary Use Cases

  • ▸Scripting and automation
  • ▸Rapid prototyping of applications
  • ▸Embedded scripting in applications
  • ▸Educational programming and teaching
  • ▸Text and data processing

Notable Features

  • ▸Multi-paradigm support (procedural, OOP, functional)
  • ▸Dynamic typing and automatic memory management
  • ▸First-class functions and closures
  • ▸Exception handling and error management
  • ▸Cross-platform execution

Origin & Creator

Falcon was created in the early 2000s by Marc LeBlanc and other contributors, aiming to provide a modern scripting language that blends multiple programming paradigms.

Industrial Note

Falcon is used in embedded scripting, automation, rapid prototyping, and educational contexts. Its multi-paradigm nature makes it suitable for niche scripting tasks where other languages might be too heavy or restrictive.

More Falcon Typing Exercises

Falcon Counter and Theme ToggleFalcon Fibonacci SequenceFalcon Factorial CalculatorFalcon Sum of ArrayFalcon Reverse StringFalcon Multiplication TableFalcon Celsius to FahrenheitFalcon Simple Alarm SimulationFalcon Random Walk Simulation

Practice Other Languages

CReactPythonC++RustTypeScriptKotlinPHPJavaC#RubyMqlCqlN1qlCypher