国产日韩欧美一区二区三区综合,日本黄色免费在线,国产精品麻豆欧美日韩ww,色综合狠狠操

極客小將

您現(xiàn)在的位置是:首頁(yè) » scratch編程資訊

資訊內(nèi)容

我用Scratch和Python編程祝福送給您Merry Christmas!

極客小將2020-11-08-
圣誕節(jié)快樂 Merry Christmas 借著圣誕節(jié)的吉利,訴說(shuō)心中的惦記。 伴隨圣誕節(jié)的歡喜,奉送永恒的支持, 把最溫馨的祝愿給您, 愿這個(gè)冬天飽含暖意。

圣誕節(jié)快樂

Merry Christmas

借著圣誕節(jié)的吉利,訴說(shuō)心中的惦記。

伴隨圣誕節(jié)的歡喜,奉送永恒的支持,

把最溫馨的祝愿給您,

愿這個(gè)冬天飽含暖意。

A Merry Christmas and a wonderful New Year.
  圣誕快樂,新年好!

  May you have the best Christmas ever.
  愿你度過(guò)最美好的圣誕節(jié)!

  Thinking of you and wishing you a beautiful Christmas season.
  美麗的圣誕節(jié)之際,謹(jǐn)致我的思念與祝福。

  Here is wishing you all a Merry Christmas and a New Year bright with joy and success.
  祝圣誕快樂,新年充滿幸福和成功。

  Wishing you and your family a very merry Christmas.
  祝福您及您的家人圣誕快樂。

  Wishing you a song in your heart at Christmas and blessings all year long.
  圣誕之際,祝你心中有首快樂的歌,新年快樂!

upload/article/images/2020-11-08/b1ab1626e5fce03238283cbc31e9fb1f.jpg

圣誕節(jié)到了!

用編程的方式

Scratch編程動(dòng)畫與Python畫圣誕樹吧

Scratch編程動(dòng)畫送上圣誕祝福

部分角色代碼

upload/article/images/2020-11-08/dec7f789456ac1da785376807d13454b.jpg

upload/article/images/2020-11-08/aaadc96ac9edc33139c4d42ff529542c.jpg

Python畫圣誕樹送上祝福

upload/article/images/2020-11-08/f6ac05bf6c0573c353f7b697a70b8a31.jpg

與Scratch相比,Python屬高級(jí)語(yǔ)言。

1、入門圣誕樹

upload/article/images/2020-11-08/b49b747da8aad636c782181998b6de91.jpg

是不是感覺Python太簡(jiǎn)單LOW了?

代碼如下:

height = 5

stars = 1

for i in range(height):

? ? print((' ' * (height - i)) + ('*' * stars))

? ? stars += 2

print((' ' * height) + ' |')

2、進(jìn)階圣誕樹

upload/article/images/2020-11-08/009b61dee18064a520068ae66e0fbe8b.jpg

額,漂亮了許多。

部分代碼如下:

import turtle

screen = turtle.Screen()

screen.setup(800,600)

circle = turtle.Turtle()

circle.shape('circle')

circle.color('red')

circle.speed('fastest')

circle.up()

square = turtle.Turtle()

square.shape('square')

square.color('green')

square.speed('fastest')

square.up()

circle.goto(0,280)

circle.stamp()

k = 0

for i in range(1, 17):

? ? y = 30*i

? ? for j in range(i-k):

。。。。。。

需要完整源代碼的在公眾號(hào)后臺(tái)留言

3、高級(jí)圣誕樹

upload/article/images/2020-11-08/ca8916affa24d30e6b9ce82801f55188.jpg

哇,好漂亮喔!

部分代碼如下:

from turtle import *

import random

import time

n = 80.0

speed("fastest")

screensize(bg='seashell')

left(90)

forward(3*n)

color("orange", "yellow")

begin_fill()

left(126)

for i in range(5):

? ? forward(n/5)

? ? right(144)

? ? forward(n/5)

? ? left(72)

預(yù)約試聽課

已有385人預(yù)約都是免費(fèi)的,你也試試吧...

主站蜘蛛池模板: 汨罗市| 剑河县| 会昌县| 沙坪坝区| 息烽县| 桃江县| 灌云县| 延川县| 台南市| 通城县| 桂平市| 南充市| 蓬安县| 桃园县| 桂林市| 平顶山市| 清水河县| 五河县| 三亚市| 天门市| 酉阳| 乐昌市| 高碑店市| 峨眉山市| 屏边| 佛学| 卢氏县| 会同县| 平利县| 黔西县| 那曲县| 云阳县| 浦城县| 井陉县| 前郭尔| 来宾市| 金塔县| 肥东县| 大足县| 乌审旗| 年辖:市辖区|