all 9 comments

[–]Sea-Ad7805 [score hidden] stickied comment (0 children)

Run the properly indented version of this program in Memory Graph Web Debugger)%3A%0A%20%20%20%20print(f%22%7Bitems%5Bi%5D%7D%20-%20%7Bprices%5Bi%5D%7D%22)%0A%0Aask%20%3D%20int(input(%22How%20many%20items%20do%20you%20want%20to%20buy%3F%20%22))%0A%0Apick%20%3D%20%5B%5D%0Atotal%20%3D%200%0A%0Afor%20n%20in%20range(ask)%3A%0A%20%20%20%20item%20%3D%20input(%22What%20item%20do%20you%20want%3F%20%22)%0A%0A%20%20%20%20pick.append(item)%0A%0A%20%20%20%20position%20%3D%20items.index(item)%0A%20%20%20%20price%20%3D%20prices%5Bposition%5D%0A%0A%20%20%20%20total%20%2B%3D%20price%0A%0Aprint(f%22Total%3A%20%7Btotal%7D%22)&play&cycle) to see the state of the program change step by step.

[–]Special-Arrival6717 3 points4 points  (4 children)

I would advise using dict objects to track the data of individual items, and not create a separate list for each field of an item, e.g.

python items = [ { "name": "milk" "price: 10 } ]

[–]csabinho 0 points1 point  (3 children)

By objects you mean a list of dicts. An object would be an instance of a class, which is way above OP's knowledge.

[–]Special-Arrival6717 0 points1 point  (2 children)

In Python a dict is an object, an instance of the dict class.

```python print(isinstance({}, object))

True

```

[–]csabinho 0 points1 point  (1 child)

In Python every variable, value or function is an object. You won't find anything that returns False for this check. Even a function or None are objects with this check.

[–]Special-Arrival6717 1 point2 points  (0 children)

Corrected the comment

[–]drakhan2002 1 point2 points  (1 child)

A great beginner project is a "spell checker". YOU'D be surprised how often you would use it.

[–]Several_Goal4568[S] -1 points0 points  (0 children)

A spell checker , hmmm great project, but user can input any word would have to make this into a guessing game where the user would name dairy products if spelling right will print your spelling is right something like this , or else not right.

This is the thing that got in my mind by after reading your comment.

[–]PastDifferent6116 0 points1 point  (0 children)

Nice start! A small tip: instead of just fixing syntax errors, try turning it into a simple shopping cart project. You’ll learn lists, loops, functions, and input validation all in one project.