You will be muted until you read the rules. Read them! @Rules_for_Python A group about the Python programming language. Offtopic things go here: @pythonofftopic Resources to learn python: @pythonres Group for Hy: @hylang Selenium: @SeleniumPython
print("Your grocery list")
Grocery={
"Rice":60,
"Wheat Flour":40,
"Sugar":45
}
total_amount=0
cart=[]
print(Grocery)
print("*************************")
while True:
item=input("Enter the item in Grocery:(q to quit)")
if item.lower()=='q':
break
elif item not in Grocery:
print("Please enter the item in Grocery list")
else:
cart.append(item)
try:
Quantity=int(input("Enter the Quantity for the item:(q to quit)"))
if Quantity == 'q':
break
elif Quantity <0:
print("Please enter a Quantity greater than '0'")
except ValueError:
print("Please enter a valid quantity")
else:
item_cost=Grocery[item]*Quantity
total_amount+=item_cost
print(total_amount)
I belive you are trying to run python statement import
in bash
which is not python
Adding the word Python
to your off-topic question doesn't magically turn it to a Python related question, so please delete your message here and move to the @PythonOfftopic group and ask there.
One of the thing it does
https://docs.python.org/3/library/marshal.html
noransaber685/demystifying-python-bytecode-a-guide-to-understanding-and-analyzing-code-execution-6a163cb83bd1" rel="nofollow">https://medium.com/@noransaber685/demystifying-python-bytecode-a-guide-to-understanding-and-analyzing-code-execution-6a163cb83bd1
Please read carefully
then you say I must google, fuck it I won't waste my time again
Читать полностью…Take python as an interpred language even if internally has an intermediate step
Читать полностью…No brother somewhere it is showing interpreter or somewhere it is showing both(complier and interpreter)
Читать полностью…This is not a Python specific question, please delete your offtopic message, move to @PythonOfftopic and ask there.
Читать полностью…This is not a Python specific question, please delete your offtopic message, move to @PythonOfftopic and ask there.
Читать полностью…Hello.
Can anyone help with suggestions or solution of why getting "bash: import: command not found" error in VS code editor python 3.11 virtual environment in debian 12?
the interpreter does it, you don't "compile" it as you do in a compiled language to run your code, you know.. don't you?
Читать полностью…No way how python convert the source code into byte code without compiler
Читать полностью…If it is interpreted language then how it convert the source code into byte code
Читать полностью…That's something you can easly answer by googling. Please use this group for more specific questions
Читать полностью…