TN Online TestSamacheer Kalvi practice

Function - Formula Sheet

Share this chapter: Telegram

Key Algorithmic Formulas and Syntax

Formula NameSyntax / RepresentationSymbol Definitions
Function Definitionlet rec fn a1 a2 ... an := kfn: Function name
rec: Keyword for recursion
a1...an: Parameter variables
k: Expression to compute
Function Type Mappingx -> yx: Input data type
y: Output data type
Multi-parameter Mappingx1 -> x2 -> yx1: First input type
x2: Second input type
y: Output data type
Euclidean GCD Relationgcd(a, b) = gcd(b, a mod b)a, b: Positive integers
mod: Modulo operator for remainder
Exponentiation Preconditionrequires: b greater than or equal to 0b: Exponent value (must be non-negative)
Exponentiation Postconditionreturns: a to the power of ba: Base value
b: Exponent value
Solved MCQs → Practice test →

More for this chapter

Book Back Questions10 textbook MCQs · solved Additional MCQs15 extra MCQs · solved Practice TestInteractive · instant score Book Back TestTest yourself on the textbook set Additional MCQ TestTest yourself on the extra set Study NotesConcepts & methods

More chapters in Computer Science

View all
2 Data Abstraction 3 Scoping 4 Algorithmic Strategies 5 Python -Variables and Operators 6 Control Structures 7 Python functions 8 Strings and String manipulation 9 Lists, Tuples, Sets and Dictionary 10 Python Classes and objects 11 Database Concepts 12 Structured Query Language (SQL) 13 Python and CSV files 14 Importing C++ programs in Python. 15 Data manipulation through SQL 16 Data visualization using pyplot: line chart, pie chart and bar chart