Menu
CoddyTech

Display Menu

Part of the Logic & Flow section of Coddy's GDScript journey. Lesson 24 of 78.

challenge icon

Challenge

Easy

In this project you build a Contact Book: a program that adds, shows, edits, deletes and lists contacts. Each contact has a name, a phone number, an email and an address. You will write it step by step, with one function per menu option.

Start with the menu. Write a function display_menu() below _ready() that prints these seven lines:

Contact Book Menu:
1. Add Contact
2. View Contact
3. Edit Contact
4. Delete Contact
5. List All Contacts
6. Exit

_ready() already calls display_menu(), so the program prints the menu once.

Try it yourself

extends Node

func _ready():
	display_menu()

func display_menu():
	# Print the menu here
	pass

All lessons in Logic & Flow

Practice on your own: Online GDScript compiler