标签:www https 开始 fill begin rtl screen span www.
视频在这
1 import turtle 2 turtle.hideturtle() 3 turtle.Turtle().screen.delay(0) 4 turtle.pensize(1) 5 turtle.penup() 6 turtle.goto(150,-70) 7 turtle.screensize(800,600) 8 9 turtle.speed(0) 10 11 #turtle.fillcolor("#ff002f") 12 #turtle.begin_fill() 13 turtle.lt(10) 14 for i in range(50): 15 turtle.lt(0.1) 16 turtle.fd(2) 17 turtle.pendown() 18 for i in range(50): 19 turtle.lt(0.1) 20 turtle.fd(2) 21 22 turtle.lt(150) 23 for i in range(50): 24 turtle.rt(0.1) 25 turtle.fd(2) 26 27 turtle.rt(145) 28 for i in range(100): 29 turtle.rt(0.1) 30 turtle.fd(2) 31 32 turtle.lt(150) 33 for i in range(100): 34 turtle.lt(0.1) 35 turtle.fd(2) 36 37 turtle.rt(145) 38 for i in range(130): 39 turtle.rt(0.1) 40 turtle.fd(2) 41 42 turtle.lt(150) 43 for i in range(130): 44 turtle.lt(0.1) 45 turtle.fd(2) 46 47 turtle.rt(100) 48 for i in range(100): 49 turtle.rt(0.1) 50 turtle.fd(2) 51 52 turtle.rt(182) 53 for i in range(100): 54 turtle.lt(0.1) 55 turtle.fd(2) 56 57 turtle.rt(110) 58 for i in range(80): 59 turtle.lt(0.3) 60 turtle.fd(1.5) 61 for i in range(25): 62 turtle.lt(0.8) 63 turtle.fd(1) 64 65 turtle.rt(93) 66 for i in range(90): 67 turtle.lt(0.5) 68 turtle.fd(2) 69 for i in range(55): 70 turtle.lt(1.2) 71 turtle.fd(4) 72 73 turtle.lt(100) 74 for i in range(80): 75 turtle.rt(0.3) 76 turtle.fd(3) 77 78 turtle.rt(160) 79 for i in range(100): 80 turtle.rt(0.1) 81 turtle.fd(2) 82 83 turtle.rt(182) 84 for i in range(100): 85 turtle.lt(0.1) 86 turtle.fd(2) 87 88 turtle.rt(150) 89 for i in range(80): 90 turtle.lt(0.2) 91 turtle.fd(2) 92 for i in range(55): 93 turtle.lt(1) 94 turtle.fd(3) 95 96 turtle.lt(110) 97 for i in range(80): 98 turtle.rt(0.2) 99 turtle.fd(3) 100 101 turtle.lt(210) 102 for i in range(100): 103 turtle.lt(0.1) 104 turtle.fd(2) 105 turtle.lt(135) 106 for i in range(100): 107 turtle.lt(0.1) 108 turtle.fd(2) 109 110 turtle.rt(140) 111 for i in range(65): 112 turtle.lt(0.5) 113 turtle.fd(2) 114 turtle.lt(130) 115 for i in range(80): 116 turtle.lt(0.1) 117 turtle.fd(2) 118 119 turtle.setheading(100) 120 for i in range(30): 121 turtle.rt(0.2) 122 turtle.fd(1) 123 turtle.setheading(-50) 124 for i in range(20): 125 turtle.rt(0.5) 126 turtle.fd(2) 127 turtle.setheading(110) 128 for i in range(80): 129 turtle.rt(0.3) 130 turtle.fd(1) 131 132 turtle.setheading(40) 133 turtle.fd(46) 134 135 turtle.setheading(-60) 136 turtle.fd(80) 137 turtle.lt(170) 138 for i in range(70): 139 turtle.rt(0.5) 140 turtle.fd(1) 141 142 turtle.rt(20) 143 for i in range(50): 144 turtle.rt(0.5) 145 turtle.fd(2) 146 147 turtle.rt(120) 148 for i in range(40): 149 turtle.lt(0.5) 150 turtle.fd(2) 151 turtle.lt(160) 152 for i in range(50): 153 turtle.rt(0.5) 154 turtle.fd(2) 155 156 turtle.setheading(-105) 157 for i in range(120): 158 turtle.lt(0.4) 159 turtle.fd(2) 160 turtle.setheading(80) 161 for i in range(50): 162 turtle.rt(0.2) 163 turtle.fd(2) 164 for i in range(70): 165 turtle.rt(0.5) 166 turtle.fd(2) 167 168 turtle.setheading(-120) 169 for i in range(50): 170 turtle.lt(1) 171 turtle.fd(2) 172 turtle.setheading(85) 173 for i in range(50): 174 turtle.rt(0.5) 175 turtle.fd(2) 176 177 turtle.setheading(-30) 178 for i in range(50): 179 turtle.rt(0.5) 180 turtle.fd(2) 181 182 turtle.setheading(-130) 183 for i in range(50): 184 turtle.lt(0.5) 185 turtle.fd(2) 186 turtle.setheading(40) 187 for i in range(40): 188 turtle.rt(0.3) 189 turtle.fd(2) 190 191 turtle.setheading(-33) 192 for i in range(69): 193 turtle.rt(0.5) 194 turtle.fd(1) 195 196 turtle.end_fill() 197 198 199 turtle.setheading(180) 200 turtle.penup() 201 turtle.fd(100) 202 turtle.setheading(-90) 203 turtle.fd(80) 204 turtle.pendown() 205 turtle.setheading(190) 206 turtle.fd(100) 207 turtle.setheading(90) 208 for i in range(25): 209 turtle.rt(0.2) 210 turtle.fd(2) 211 for i in range(40): 212 turtle.rt(1.5) 213 turtle.fd(2) 214 for i in range(20): 215 turtle.rt(0.2) 216 turtle.fd(2) 217 for i in range(40): 218 turtle.rt(2) 219 turtle.fd(1) 220 turtle.setheading(-101) 221 turtle.fd(102) 222 turtle.penup() 223 turtle.setheading(180) 224 turtle.fd(50) 225 turtle.setheading(90) 226 turtle.fd(100) 227 turtle.pendown() 228 turtle.fillcolor("BLACK") 229 turtle.begin_fill() 230 turtle.setheading(0) 231 for i in range(80): 232 turtle.rt(3.5) 233 turtle.fd(2) 234 turtle.end_fill() 235 236 turtle.setheading(-135) 237 turtle.fd(60) 238 turtle.setheading(55) 239 turtle.fd(120) 240 for i in range(40): 241 turtle.rt(2) 242 turtle.fd(1) 243 turtle.fd(70) 244 for i in range(40): 245 turtle.rt(2) 246 turtle.fd(1) 247 turtle.setheading(150) 248 turtle.fd(45) 249 250 251 ‘*******************‘ 252 turtle.setheading(180) 253 turtle.penup() 254 turtle.fd(330) 255 turtle.setheading(-90) 256 turtle.fd(90) 257 turtle.pendown() 258 turtle.setheading(-10) 259 turtle.fd(100) 260 turtle.setheading(90) 261 for i in range(25): 262 turtle.lt(0.2) 263 turtle.fd(2) 264 for i in range(40): 265 turtle.lt(1.5) 266 turtle.fd(2) 267 for i in range(20): 268 turtle.lt(0.2) 269 turtle.fd(2) 270 for i in range(40): 271 turtle.lt(2) 272 turtle.fd(1) 273 turtle.setheading(-79) 274 turtle.fd(102) 275 turtle.penup() 276 turtle.setheading(0) 277 turtle.fd(50) 278 turtle.setheading(90) 279 turtle.fd(100) 280 turtle.pendown() 281 turtle.setheading(180) 282 turtle.begin_fill() 283 for i in range(80): 284 turtle.lt(3.5) 285 turtle.fd(2) 286 turtle.end_fill() 287 turtle.setheading(-45) 288 turtle.fd(60) 289 turtle.setheading(125) 290 turtle.fd(120) 291 for i in range(40): 292 turtle.lt(2) 293 turtle.fd(1) 294 turtle.fd(70) 295 for i in range(40): 296 turtle.lt(2) 297 turtle.fd(1) 298 turtle.setheading(27) 299 turtle.fd(45) 300 301 302 turtle.setheading(-90) 303 turtle.penup() 304 turtle.fd(140) 305 turtle.pendown() 306 turtle.setheading(-3) 307 turtle.fd(120) 308 turtle.setheading(187) 309 turtle.fd(120) 310 turtle.setheading(-3) 311 turtle.fd(120) 312 313 turtle.setheading(0) 314 turtle.penup() 315 turtle.fd(230) 316 turtle.setheading(90) 317 turtle.fd(35) 318 turtle.pendown() 319 turtle.setheading(187) 320 turtle.fd(120) 321 turtle.setheading(-3) 322 turtle.fd(120) 323 turtle.setheading(187) 324 turtle.fd(120) 325 326 #‘*********** 327 328 turtle.setheading(180) 329 turtle.penup() 330 turtle.fd(50) 331 turtle.setheading(-90) 332 turtle.fd(20) 333 turtle.pendown() 334 for i in range(20): 335 turtle.lt(2) 336 turtle.fd(1) 337 turtle.lt(150) 338 for i in range(30): 339 turtle.rt(1.7) 340 turtle.fd(1) 341 turtle.lt(140) 342 for i in range(20): 343 turtle.lt(2.8) 344 turtle.fd(1) 345 346 turtle.penup() 347 turtle.setheading(180) 348 turtle.fd(45) 349 turtle.setheading(-90) 350 turtle.fd(40) 351 turtle.pendown() 352 turtle.setheading(-15) 353 for i in range(100): 354 turtle.lt(0.5) 355 turtle.fd(1.2) 356 #****************** 357 turtle.pensize(1) 358 turtle.penup() 359 turtle.setheading(180) 360 turtle.fd(40) 361 turtle.setheading(-90) 362 turtle.fd(40) 363 turtle.pendown() 364 for i in range(12): 365 turtle.setheading(-92) 366 turtle.fd(5) 367 turtle.setheading(120) 368 turtle.fd(6) 369 turtle.setheading(-90) 370 turtle.fd(6) 371 for i in range(12): 372 turtle.setheading(-87) 373 turtle.fd(5) 374 turtle.setheading(55) 375 turtle.fd(6) 376 377 turtle.penup() 378 turtle.goto(250,-50) 379 turtle.setheading(-95) 380 turtle.pendown() 381 for i in range(140): 382 turtle.rt(0.1) 383 turtle.fd(1.5) 384 for i in range(40): 385 turtle.rt(0.8) 386 turtle.fd(1.5) 387 turtle.setheading(-150) 388 turtle.fd(100) 389 turtle.setheading(-150) 390 for i in range(110): 391 turtle.rt(0.6) 392 turtle.fd(1.5) 393 394 turtle.setheading(150) 395 for i in range(50): 396 turtle.rt(0.05) 397 turtle.fd(1.5) 398 turtle.setheading(130) 399 turtle.fd(50) 400 turtle.setheading(115) 401 for i in range(170): 402 turtle.rt(0.1) 403 turtle.fd(1.5) 404 #画耳朵 405 turtle.goto(-210,-150) 406 turtle.setheading(260) 407 for i in range(50): 408 turtle.rt(2.1) 409 turtle.fd(1) 410 turtle.setheading(130) 411 turtle.fd(100) 412 turtle.setheading(135) 413 for i in range(82): 414 turtle.rt(1.8) 415 turtle.fd(1) 416 417 turtle.penup() 418 turtle.goto(-270,-100) 419 turtle.pendown() 420 turtle.circle(-30,100) 421 turtle.penup() 422 turtle.goto(-280,-70) 423 turtle.pendown() 424 turtle.pensize(0.5) 425 for i in range(10): 426 turtle.setheading(185) 427 turtle.fd(10) 428 turtle.setheading(-5) 429 turtle.fd(10) 430 turtle.penup() 431 turtle.goto(-250,-100) 432 turtle.pendown() 433 turtle.setheading(170) 434 for i in range(30): 435 turtle.lt(1) 436 turtle.fd(1) 437 turtle.penup() 438 turtle.goto(-240,-173) 439 turtle.pendown() 440 turtle.setheading(-90) 441 turtle.fd(25) 442 turtle.setheading(0) 443 444 for i in range(120): 445 if 0<=i<30 or 60<=i<90: 446 turtle.rt(3) 447 turtle.fd(0.9) 448 else: 449 turtle.rt(3) 450 turtle.fd(0.5) 451 turtle.penup() 452 turtle.setheading(-90) 453 turtle.fd(27) 454 turtle.pendown() 455 turtle.fd(20) 456 for i in range(120): 457 if 0<=i<30 or 60<=i<90: 458 turtle.rt(3) 459 turtle.fd(1.1) 460 else: 461 turtle.rt(3) 462 turtle.fd(0.7) 463 #开始画左边的耳朵 464 465 turtle.penup() 466 turtle.goto(240,-130) 467 turtle.pendown() 468 turtle.setheading(280) 469 for i in range(50): 470 turtle.lt(2.1) 471 turtle.fd(1) 472 turtle.setheading(55) 473 turtle.fd(90) 474 turtle.setheading(45) 475 for i in range(80): 476 turtle.lt(1.8) 477 turtle.fd(1) 478 #************* 479 480 turtle.penup() 481 turtle.goto(290,-100) 482 turtle.pendown() 483 turtle.circle(-30,100) 484 turtle.penup() 485 turtle.goto(290,-60) 486 turtle.pendown() 487 turtle.pensize(0.5) 488 for i in range(10): 489 turtle.setheading(185) 490 turtle.fd(10) 491 turtle.setheading(-5) 492 turtle.fd(10) 493 turtle.penup() 494 turtle.goto(270,-120) 495 turtle.pendown() 496 turtle.setheading(20) 497 for i in range(70): 498 turtle.lt(1) 499 turtle.fd(1) 500 501 #画吊坠!!!!!!!! 502 turtle.penup() 503 turtle.goto(275,-150) 504 turtle.pendown() 505 turtle.setheading(-90) 506 turtle.fd(25) 507 turtle.setheading(0) 508 509 for i in range(120): 510 if 0<=i<30 or 60<=i<90: 511 turtle.rt(3) 512 turtle.fd(0.5) 513 else: 514 turtle.rt(3) 515 turtle.fd(0.9) 516 turtle.penup() 517 turtle.setheading(-90) 518 turtle.fd(23) 519 turtle.pendown() 520 turtle.fd(17) 521 turtle.setheading(0) 522 for i in range(120): 523 if 0<=i<30 or 60<=i<90: 524 turtle.rt(3) 525 turtle.fd(1.1) 526 else: 527 turtle.rt(3) 528 turtle.fd(0.7) 529 530 turtle.hideturtle() 531 turtle.exitonclick() 532 turtle.clear()
标签:www https 开始 fill begin rtl screen span www.
原文地址:https://www.cnblogs.com/wang93/p/9951572.html