Quantcast
Channel: Active questions tagged kernel - Stack Overflow
Viewing all articles
Browse latest Browse all 6502

Turtle Canvas Crash

$
0
0

This code causes python to crash. Then when I run it again, I get this error: "Error: Session cannot generate requests." I try restarting the kernel but it just never recovers. I have to close VS Code and reopen it to run code again. What is causing this?

import turtleimport random as rfor bdvj in range(1):    for introg1 in range(1):        t=turtle.Pen()        turtle.bgcolor('black')        colors = ['purple', 'pink','green', 'blue', 'red','yellow','lime']        t.speed(3) #speed of pen        fs=20        for i in range(1):            for x in range(100):                co=r.choice(colors)                t.pencolor(co)                t.penup() #drawing text below                t.forward(i*4)                t.pendown()                t.write('Summer',align="center",font=("Arial",fs,"bold"))                t.left(90)                fs+=2                if x==30:                    break #when x= 30, breaks out of the loop

Viewing all articles
Browse latest Browse all 6502

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>