Skip to content

Latest commit

 

History

History
19 lines (13 loc) · 679 Bytes

File metadata and controls

19 lines (13 loc) · 679 Bytes

In this small exercise you will extend functions and use extensively if-else expressions.

If-Else-Expressions

Scala's if-else expression is similar to Java's condition expresion: "condition ? if-value : else-value"

Calculator: Signum

Extend the calculator with a signum operator

Boolean inverter

Use if-else to convert a boolean input

Boolean operations

Use if-else to implement these boolean operations: and, or, negate

Resources

if-else expression