← Back to Basics

Character Stats

1 of 8

Exercise 1: Character Stats 🎨

πŸ“¦ Variables πŸ”„ Type Casting πŸ“ Strings

Your Task

Create these variables for your Roblox character:

  • name = your username (string)
  • level = 5 (integer)
  • health = 100.0 (float)
  • coins = 250 (integer)

Then:

  1. Print each variable
  2. Add 50 to coins
  3. Subtract 15.5 from health
  4. Print: "[name] is level [level] with [health] HP and [coins] coins"

Example Output

CoolGamer
5
100.0
250
CoolGamer is level 5 with 84.5 HP and 300 coins

Try it yourself

Code: Character Stats

Loading Python runtime…
Python …
Loading...
bash
$ Click "Run" to execute your code...