Menu
CoddyTech

Getting Input

Part of the Fundamentals section of Coddy's GDScript journey. Lesson 39 of 92.

challenge icon

Challenge

Easy

After the welcome message, read two numbers from the input, in this order:

  1. the bill amount
  2. the tip percentage

Cast both to float and store them in the variables bill_amount and tip_percentage.

Keep the print() line from the previous step. The program does not print anything new yet, so its output is still:

Bill Split Calculator

Try it yourself

extends Node

func _ready():
	print("Bill Split Calculator")

All lessons in Fundamentals

Practice on your own: Online GDScript compiler