I am new to working with the CLI (Command Line Interface), and I am trying to write a run script for my macOS terminal from a python 3. I followed all the instructions from cloning the repository on my local machine by installing Xcode-beta and cloning it on my local machine using Xcode-beta. I was able to fix [Errno 2] by dragging the code into the terminal to get the exact directory code line and then by using sudo I corrected the permission denied issue. Now I am having trouble with syntax error unexpected token ' ('. The following image shows the error I am getting. enter image description here
This is the error below as shown in the image from my command terminal:
/Users/stevengomezroldan/Desktop/Github Projects/Github_Codinng_Projects/Python-Projects/python-random-quote/get-quote.py: line 1: syntax error near unexpected token (' /Users/stevengomezroldan/Desktop/Github Projects/Github_Codinng_Projects/Python-Projects/python-random-quote/get-quote.py: line 1:
def main():'
Here is the script that was provided to run random logical expressions:
def main ():
print ("Keep it logically awesome.")
#f = open("quote.txt")
#quotes = f.readlines()
#f.close()
#print(quotes)
if__name__=="__main__"
main()
I working on some courses in Github, and I am trying to have the command terminal to print the expression "Keep it logically awesome."
Thanks for the help. I also have python3 (most recent installed) and recently installed Xcode-beta.