Game Overview
Part of the Fundamentals section of Coddy's GDScript journey. Lesson 58 of 92.
Challenge
EasyIn this project you build FizzBuzz, a classic programming game. The program goes through the numbers from 1 up to a limit, and for each number it prints:
Fizzif the number is divisible by 3Buzzif the number is divisible by 7FizzBuzzif the number is divisible by both 3 and 7- the number itself otherwise
You will write it step by step, and the last step adds a twist to the rules.
Start with the welcome message. Replace pass with a statement that prints:
Welcome to FizzBuzz!Try it yourself
extends Node
func _ready():
# Print the welcome message
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