Very new to programming and trying to write a Wheel of Fortune game using Python. One of the features is a dictionary that contains all of the possible wheel slices. A function will, among other things, grab a random key and return that value. The dictionary:
wheel = {
"Bankrupt": bankrupt(), # a function that removes all the player's money
"$100": 100,
"$200": 200,
"$300": 300,
"$400": 400,
"$500": 500,
"$600": 600,
"$700": 700,
"$800": 800,
"$900": 900,
"$1000": 1000,
"$2000": 2000
}
I'm sure this is a really newbie question but I cannot understand why the bankrupt function within the dictionary is being called as soon as I run the script, before I've actually called it via that other function which selects a random wheel slice.
Any guidance would be much appreciated.