Recap - Till 120
Part of the Fundamentals section of Coddy's GDScript journey. Lesson 36 of 92.
Challenge
EasyWrite a program that reads a person's age from the input and prints how many years are left until they turn 120.
For example, if the input is 25, the program prints:
95 years till 120Print only this line, in exactly this format.
Try it yourself
extends Node
func _ready():
# Write code here
pass
All lessons in Fundamentals
4Operators Part 1
Arithmetic OperatorsInteger DivisionModulo OperatorArithmetic ShortcutsRecap - Simple MathComparison Operators10Functions
Declare a FunctionArgumentsReturnReturn TypesRecap - Sigma FunctionRecap - Validation FunctionDefault Values5Operators Part 2
Logical Operators Part 1Logical Operators Part 2Recap - Simple LogicLogical Operators Part 3Ternary OperatorPractice on your own: Online GDScript compiler