Python Forum
[split] SyntaxError when trying to execute code on Windows
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[split] SyntaxError when trying to execute code on Windows
#1
I would be happy to help me.
when I running this code :
print("""
 _    _
| |  | |
| |__| | __ _ _ __   __ _ _ __ ___   __ _ _ __ 
|  __  |/ _' | '_ \ / _' | '_ ' _ \ / _' | '_ \ 
| |  | | (_| | | | | (_| | | | | | | (_| | | | |
|_|  |_|\__,_|_| |_|\__, |_| |_| |_|\__,_|_| |_|
                     __/ |
                    |___/
""")
I accepted this error:
^
Error:
SyntaxError: unexpected character after line continuation character
Reply
#2
your code works for me.
post the full code you have. Sometimes the error may be on the previous line
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply
#3
the full code:
import random
print("""
 _    _
| |  | |
| |__| | __ _ _ __   __ _ _ __ ___   __ _ _ __ 
|  __  |/ _' | '_ \ / _' | '_ ' _ \ / _' | '_ \ 
| |  | | (_| | | | | (_| | | | | | | (_| | | | |
|_|  |_|\__,_|_| |_|\__, |_| |_| |_|\__,_|_| |_|
                     __/ |
                    |___/
""")
random.randint(5, 10)
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  How to Translate a python code written in Mac-OS to Windows? alexanderDennisEnviro500 2 126 Jul-31-2021, 08:36 AM
Last Post: Gribouillis
Sad SyntaxError: from simple python example file from mind-monitor code (muse 2) warmcupoftea 4 216 Jul-16-2021, 02:51 PM
Last Post: warmcupoftea
  [split] SyntaxError: invalid syntax Code_X 3 452 May-04-2021, 05:15 PM
Last Post: Yoriz
  [split] Kera Getting errors when following code example Image classification from scratch hobbyist 3 1,830 Apr-13-2021, 01:26 PM
Last Post: amirian
  Using a .bat file to execute simple anaconda commands in Windows 10 gacg1 0 861 Nov-30-2020, 03:24 PM
Last Post: gacg1
  "SyntaxError: invalid syntax" running code in Doing Math With Python b saucerdesigner 2 648 Nov-03-2020, 04:23 PM
Last Post: saucerdesigner
  [split] Python code help sairam17519 3 782 Sep-10-2020, 01:44 PM
Last Post: sairam17519
  How to Split Output Audio on Text to Speech Code Base12 2 2,536 Aug-29-2020, 03:23 AM
Last Post: Base12
  How to split and combine embedded lines using less code pjfarley3 6 754 Aug-13-2020, 09:13 PM
Last Post: pjfarley3
  SyntaxError when trying to execute code on Windows Fred0n 2 962 Apr-25-2020, 04:30 AM
Last Post: buran

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020