writeln and write
This lesson explores the difference between writeln and write with the help of a coding example.
We'll cover the following
Functions and parameters #
In the previous lesson, we learned that writeln
takes a string within parentheses and prints the string. Before we move onto an example code to understand the difference between working of writeln
and write
, let’s get a little insight into some programming terms.
-
Functions: The parts of a program that perform a task are called functions.
-
Parameters: A parameter is information provided to functions in order for the functions to complete their work.
The act of giving information to functions is called passing parameter values to them. Parameters are passed to functions within parentheses, separated by commas as illustrated below.
Get hands-on with 1400+ tech skills courses.