|
@@ -19,7 +19,7 @@
|
|
|
},
|
|
|
{
|
|
|
"cell_type": "code",
|
|
|
- "execution_count": 125,
|
|
|
+ "execution_count": 1,
|
|
|
"metadata": {},
|
|
|
"outputs": [],
|
|
|
"source": [
|
|
@@ -35,7 +35,7 @@
|
|
|
},
|
|
|
{
|
|
|
"cell_type": "code",
|
|
|
- "execution_count": 126,
|
|
|
+ "execution_count": 2,
|
|
|
"metadata": {},
|
|
|
"outputs": [],
|
|
|
"source": [
|
|
@@ -73,7 +73,7 @@
|
|
|
},
|
|
|
{
|
|
|
"cell_type": "code",
|
|
|
- "execution_count": 127,
|
|
|
+ "execution_count": 3,
|
|
|
"metadata": {},
|
|
|
"outputs": [],
|
|
|
"source": [
|
|
@@ -101,7 +101,7 @@
|
|
|
},
|
|
|
{
|
|
|
"cell_type": "code",
|
|
|
- "execution_count": 128,
|
|
|
+ "execution_count": 4,
|
|
|
"metadata": {},
|
|
|
"outputs": [],
|
|
|
"source": [
|
|
@@ -144,7 +144,7 @@
|
|
|
},
|
|
|
{
|
|
|
"cell_type": "code",
|
|
|
- "execution_count": 129,
|
|
|
+ "execution_count": 5,
|
|
|
"metadata": {},
|
|
|
"outputs": [],
|
|
|
"source": [
|
|
@@ -210,7 +210,7 @@
|
|
|
},
|
|
|
{
|
|
|
"cell_type": "code",
|
|
|
- "execution_count": 130,
|
|
|
+ "execution_count": 6,
|
|
|
"metadata": {},
|
|
|
"outputs": [],
|
|
|
"source": [
|
|
@@ -227,9 +227,180 @@
|
|
|
},
|
|
|
{
|
|
|
"cell_type": "code",
|
|
|
- "execution_count": null,
|
|
|
+ "execution_count": 7,
|
|
|
"metadata": {},
|
|
|
- "outputs": [],
|
|
|
+ "outputs": [
|
|
|
+ {
|
|
|
+ "name": "stdout",
|
|
|
+ "output_type": "stream",
|
|
|
+ "text": [
|
|
|
+ "Welcome to the garden! You will act as a virtual gardener.\n",
|
|
|
+ "Forage for new seeds, plant them, and then watch them grow!\n",
|
|
|
+ "Start by entering your name.\n"
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "name": "stdin",
|
|
|
+ "output_type": "stream",
|
|
|
+ "text": [
|
|
|
+ "What is your name? Jane Doe\n"
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "name": "stdout",
|
|
|
+ "output_type": "stream",
|
|
|
+ "text": [
|
|
|
+ "Welcome, Jane Doe! Let's get gardening!\n",
|
|
|
+ "Type 'help' for a list of commands.\n"
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "name": "stdin",
|
|
|
+ "output_type": "stream",
|
|
|
+ "text": [
|
|
|
+ "What would you like to do? help\n"
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "name": "stdout",
|
|
|
+ "output_type": "stream",
|
|
|
+ "text": [
|
|
|
+ "*** Commands ***\n",
|
|
|
+ "plant\n",
|
|
|
+ "tend\n",
|
|
|
+ "harvest\n",
|
|
|
+ "forage\n",
|
|
|
+ "help\n",
|
|
|
+ "quit\n"
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "name": "stdin",
|
|
|
+ "output_type": "stream",
|
|
|
+ "text": [
|
|
|
+ "What would you like to do? forage\n"
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "name": "stdout",
|
|
|
+ "output_type": "stream",
|
|
|
+ "text": [
|
|
|
+ "Jane Doe found a lettuce seed!\n"
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "name": "stdin",
|
|
|
+ "output_type": "stream",
|
|
|
+ "text": [
|
|
|
+ "What would you like to do? plant\n"
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "name": "stdout",
|
|
|
+ "output_type": "stream",
|
|
|
+ "text": [
|
|
|
+ "1. lettuce\n"
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "name": "stdin",
|
|
|
+ "output_type": "stream",
|
|
|
+ "text": [
|
|
|
+ "Select an item: 1\n"
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "name": "stdout",
|
|
|
+ "output_type": "stream",
|
|
|
+ "text": [
|
|
|
+ "Jane Doe planted a lettuce!\n"
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "name": "stdin",
|
|
|
+ "output_type": "stream",
|
|
|
+ "text": [
|
|
|
+ "What would you like to do? tend\n"
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "name": "stdout",
|
|
|
+ "output_type": "stream",
|
|
|
+ "text": [
|
|
|
+ "Lettuce is now a sprout!\n"
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "name": "stdin",
|
|
|
+ "output_type": "stream",
|
|
|
+ "text": [
|
|
|
+ "What would you like to do? tend\n"
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "name": "stdout",
|
|
|
+ "output_type": "stream",
|
|
|
+ "text": [
|
|
|
+ "Lettuce is now a mature!\n"
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "name": "stdin",
|
|
|
+ "output_type": "stream",
|
|
|
+ "text": [
|
|
|
+ "What would you like to do? tend\n"
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "name": "stdout",
|
|
|
+ "output_type": "stream",
|
|
|
+ "text": [
|
|
|
+ "Lettuce is now a harvest-ready!\n"
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "name": "stdin",
|
|
|
+ "output_type": "stream",
|
|
|
+ "text": [
|
|
|
+ "What would you like to do? harvest\n"
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "name": "stdout",
|
|
|
+ "output_type": "stream",
|
|
|
+ "text": [
|
|
|
+ "1. Lettuce\n"
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "name": "stdin",
|
|
|
+ "output_type": "stream",
|
|
|
+ "text": [
|
|
|
+ "Select an item: 1\n"
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "name": "stdout",
|
|
|
+ "output_type": "stream",
|
|
|
+ "text": [
|
|
|
+ "You harvested a Lettuce!\n"
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "name": "stdin",
|
|
|
+ "output_type": "stream",
|
|
|
+ "text": [
|
|
|
+ "What would you like to do? quit\n"
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "name": "stdout",
|
|
|
+ "output_type": "stream",
|
|
|
+ "text": [
|
|
|
+ "Goodbye!\n"
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ ],
|
|
|
"source": [
|
|
|
"# Print welcome message\n",
|
|
|
"print(\"Welcome to the garden! You will act as a virtual gardener.\\nForage for new seeds, plant them, and then watch them grow!\\nStart by entering your name.\")\n",
|
|
@@ -266,7 +437,7 @@
|
|
|
],
|
|
|
"metadata": {
|
|
|
"kernelspec": {
|
|
|
- "display_name": "Python 3",
|
|
|
+ "display_name": "Python 3 (ipykernel)",
|
|
|
"language": "python",
|
|
|
"name": "python3"
|
|
|
},
|
|
@@ -280,10 +451,9 @@
|
|
|
"name": "python",
|
|
|
"nbconvert_exporter": "python",
|
|
|
"pygments_lexer": "ipython3",
|
|
|
- "version": "3.11.3"
|
|
|
- },
|
|
|
- "orig_nbformat": 4
|
|
|
+ "version": "3.10.6"
|
|
|
+ }
|
|
|
},
|
|
|
"nbformat": 4,
|
|
|
- "nbformat_minor": 2
|
|
|
+ "nbformat_minor": 4
|
|
|
}
|