Your own chatbot - Marvin inventory
Programming and problem solving in Python. Use file to help Marvin keep track of his inventory.
You know the basics of Python and file management. You also built the second part of Marvin.
You will build a backpack for Marvin and you will save the contents of the backpack to file.
You should communicate with Marvin via text and not via a menu choice.
* marvin replies with the contents of the inventory *
> inv pick the momentum roll
* Marvin replies that he took up the Moomin role *
> inv drop the momentum roll
* marvin replies by releasing the moomin role *
See what it can look like when the task is complete:
Build on your Marvin 2.
# Stand in the course catalog
cp -ri me / kmom03 / marvin2 / * me / kmom04 / marvin3
cd me / kmom04 / marvin3
Create a new file [login to view URL], it should contain the code for the while loop and what choice is made. [login to view URL] should contain all code that is run when a selection is made, that is, each individual roll code. Import [login to view URL] into main.py.
Then create a new file [login to view URL], this file should contain the code to handle Marvin's inventory as described in the requirements below.
Marvin should be able to pick up anything.
Save the contents of the backpack to a file that you rename to inv.data.
When you start, you load the contents of the backpack from the file.
When you give inventory commands to Marvin it should be done in plain text. By talking to Marvin, via commands, he should be able to show and change the contents of his inventory.
The following commands should work. Note that Marvin should be able to pick up anything. Below is the example flower only.
Command What happens
inv Show what is in the inventory and how many things there are.
inv pick flower Pick up a flower, a flower.
inv drop flower Throw away the flower.
8 pekerja bebas membida secara purata $27 untuk pekerjaan ini
Hello. I have read your project details before placing my bid. I can assure you that I can deliver high quality work on time. I am willing to start immediately. Thank you.
I am strong in basics in functional programming can do python coding as per your requirement Relevant Skills and Experience Python , Scala, spark , sql,PL/sql