invalid syntax 若葉マーク
SyntaxError: invalid syntax
たった、これだけで、嵌まると気づくのに時間を消費!
-----------
for y in range( 0, 129, 1) :
draw.line((( 128,y),(0,128-y), fill=(0,0,255))
↑ ^
ここに「)」が無かった為に「=」の下に
^ マークで
---------------------------
「= 」のどこに問題があるのか!??
実は、座標のくくりの ,128-y))の「)」が、落ちて居た!!!
=の直下の マーカー「^」に執着して、嵌まる :)
後日、一杯エラーを出してみると、エラー・マーク[ ^ ]のその箇所と言うより、
その前辺りに、間違いが有ることが分かりました。
その前辺り=間違い箇所をインタプリタが通過した後で 『おっと、間違い発見!』と[ ^ ]を
打ってくれるみたい?インタプリタが速すぎて [ ^ ]を打つのが僅かに遅れる
みたいなイメージ?
「:」や「)」や「,]等の適切な使用に留意しましょう :)
この画は
幅128
縦160のスクリーンに背景白で、青の直線連続描画=ぬりつぶし
たった、これだけで、嵌まると気づくのに時間を消費!
-----------
for y in range( 0, 129, 1) :
draw.line((( 128,y),(0,128-y), fill=(0,0,255))
↑ ^
ここに「)」が無かった為に「=」の下に
^ マークで
---------------------------
「= 」のどこに問題があるのか!??
実は、座標のくくりの ,128-y))の「)」が、落ちて居た!!!
=の直下の マーカー「^」に執着して、嵌まる :)
後日、一杯エラーを出してみると、エラー・マーク[ ^ ]のその箇所と言うより、
その前辺りに、間違いが有ることが分かりました。
その前辺り=間違い箇所をインタプリタが通過した後で 『おっと、間違い発見!』と[ ^ ]を
打ってくれるみたい?インタプリタが速すぎて [ ^ ]を打つのが僅かに遅れる
みたいなイメージ?
「:」や「)」や「,]等の適切な使用に留意しましょう :)
この画は
幅128
縦160のスクリーンに背景白で、青の直線連続描画=ぬりつぶし
- IMG_20210918_163138.jpg
- IMG_20210918_163138.jpg (52.31 KiB) Viewed 4344 times
Jump to
- Community
- General discussion
- Announcements
- Other languages
- Deutsch
- Español
- Français
- Italiano
- Nederlands
- 日本語
- Polski
- Português
- Русский
- Türkçe
- User groups and events
- Raspberry Pi Official Magazine
- Using the Raspberry Pi
- Beginners
- Troubleshooting
- Advanced users
- Assistive technology and accessibility
- Education
- Picademy
- Teaching and learning resources
- Staffroom, classroom and projects
- Astro Pi
- Mathematica
- High Altitude Balloon
- Weather station
- Programming
- C/C++
- Java
- Python
- Scratch
- Other programming languages
- Windows 10 for IoT
- Wolfram Language
- Bare metal, Assembly language
- Graphics programming
- OpenGLES
- OpenVG
- OpenMAX
- General programming discussion
- Projects
- Networking and servers
- Automation, sensing and robotics
- Graphics, sound and multimedia
- Other projects
- Gaming
- Media centres
- AIY Projects
- Hardware and peripherals
- Camera board
- Compute Module
- Official Display
- HATs and other add-ons
- Device Tree
- Interfacing (DSI, CSI, I2C, etc.)
- Keyboard computers (400, 500, 500+)
- Raspberry Pi Pico
- General
- SDK
- MicroPython
- Other RP2040 boards
- Zephyr
- Rust
- AI Accelerator
- AI Camera - IMX500
- Hailo
- Software
- Raspberry Pi OS
- Raspberry Pi Connect
- Raspberry Pi Desktop for PC and Mac
- Beta testing
- Other
- Android
- Debian
- FreeBSD
- Gentoo
- Linux Kernel
- NetBSD
- openSUSE
- Plan 9
- Puppy
- Arch
- Pidora / Fedora
- RISCOS
- Ubuntu
- Ye Olde Pi Shoppe
- For sale
- Wanted
- Off topic
- Off topic discussion