Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 

Repository files navigation

Programming-exercise-2

Instructions

Part 1: Create a Hero

Open main.py. You need to create variables to store the following information about a game character:

  1. Name (String): Give your hero a name (e.g., "Aragon").
  2. Level (Integer): Set their starting level (e.g., 1).
  3. Money (Double/Float): Give them some gold coins (e.g., 12.50).
  4. Class Initial (Char): A single letter representing their job (e.g., 'W' for Wizard, 'K' for Knight).
  5. Is Alive? (Boolean): Set this to True.

Part 2: Display the Stats

Use the print() command to display the stats on the screen. It should look like this:

--- HERO STATS ---
Name: Aragon
Level: 1
Gold: 12.5
Class: W
Alive: True

Run your code in Thonny to make sure it prints the stats.

Upload your main.py file to this repository.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors