Ditutup

python3 read file

Your own chatbot - Marvin inventory

Programming and problem solving in Python. Use file to help Marvin keep track of his inventory.

Previous knowledge

You know the basics of Python and file management. You also built the second part of Marvin.

Introduction

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.

> inv

* 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:

Requirement

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.

Kemahiran: Python

Lihat lagi: java read file ubuntu, read file java readline, asp read file variable, read file find average data, java read file complete, programming read file, java read file, program read file write file, java read file encoding, html read file, browse file php read file php free example, read file fileupload, java read file utf8

Tentang Majikan:
( 0 ulasan ) Karlshamn, Sweden

ID Projek: #21589999

8 pekerja bebas membida secara purata $27 untuk pekerjaan ini

usamamw141

Hey there, I am expert in Python and I can do this type of project. Feel free to inbox me now. Thank you,

$20 USD dalam 7 hari
(14 Ulasan)
4.1
onyx00programmer

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.

$30 USD dalam 2 hari
(4 Ulasan)
2.6
Chan1010

Dear Client! I read your description carefully and i'm very interested in your project. I am specialized in python. I am free now and I will start work right now. I will work in full time. I will guarantee well commen Lagi

$50 USD dalam 2 hari
(4 Ulasan)
2.0
sandking19915

Hi, I’ve gone through your complete project description. Firstly, your description is great to read and easy to gain an understanding of what you want. Secondly, I’m very interested in your project as it is exactly wi Lagi

$20 USD dalam 7 hari
(0 Ulasan)
0.0
soniasappal

Hi, My name is Sonia, I am Solution Architect with 8 years of IT experience in App and Web development, my core area of programming is the JAVA SCRIPT and I can also help you with framework like Express. I can provid Lagi

$20 USD dalam 7 hari
(0 Ulasan)
0.0
usmanirfanuaf

i'm a pythn develper with 3+ year's of experience that specializes me in multi-platform applications using Pyside/puqt,scrapy,pillow matplotlib. I am also working as a full stack developer, so that I have more experien Lagi

$20 USD dalam 7 hari
(0 Ulasan)
0.0
tusharvv76

I have FULL CONFIDENCE of completing this Marvin chatbot homework assignment and I am ready to start IMMEDIATELY. I will also write detailed comments wherever needed. QUESTIONS/COMMENTS * As I see it, you ALREADY had Lagi

$30 USD dalam 4 hari
(0 Ulasan)
0.0
abhipint90

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

$25 USD dalam sehari
(0 Ulasan)
0.0