Jun-22-2020, 07:00 PM
Hi all -
Total Python beginner looking for some help. I looked all over for an answer with no luck... sorry for the total newbie question. I'm working my way through Eric Matthes' Python Crash Course book.
Here's my code:
Thanks for the help!
Total Python beginner looking for some help. I looked all over for an answer with no luck... sorry for the total newbie question. I'm working my way through Eric Matthes' Python Crash Course book.
Here's my code:
import pizza pizza.make_pizza(16,'mushrooms')Here is the file pizza - which is in the same directory as making.pizza
def make_pizza(size, *toppings): """ Summarize the pizza we are about to make """ print(f"\nMaking a {size}-inch pizza with the following toppings:") for topping in toppings: print(f"- {topping}")For some reason the import isn't working. Here's the error I'm getting...
Error:Traceback (most recent call last):
File "/Users/jdhamblett/Desktop/python_work/making_pizzas", line 1, in <module>
import pizza
ModuleNotFoundError: No module named 'pizza'
[Finished in 0.4s with exit code 1]
[cmd: ['python3', '-u', '/Users/jdhamblett/Desktop/python_work/making_pizzas']]
[dir: /Users/jdhamblett/Desktop/python_work]
[path: /Library/Frameworks/Python.framework/Versions/3.8/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin]
Is there a configuration setting I'm missing in Sublime Text (I couldn't get this to work on my terminal session either on my Mac). I'm running Python3 3.8.3.Thanks for the help!