zoukankan      html  css  js  c++  java
  • Pycharm开发环境设置与熟悉

    Pycharm开发环境设置与熟悉。

    练习基本输入输出:

    print('你好,{}.'.format(name))

    uprint(sys.argv)

    库的使用方法:

    import ...

    from ... import ...

    条件语句:

        if (abs(pos()))<1:

            break

    循环语句:

    for i in range(5):

    while True:

    函数定义:

    def mygoto(x,y):

    def drawjx(r):

    综合练习:画一面五星红旗,将代码与运行截图发布博客交作业。

    import turtle
    # 定义的一个函数,用于画五角星
    def picture(x1,y1,x,y):
        turtle.up()
        turtle.goto(x1, y1)
        turtle.down()
    #这个比较重要,用于填充颜色 turtle.begin_fill() turtle.fillcolor(
    "yellow") for i in range(5): turtle.forward(x) turtle.left(y) turtle.end_fill() # 速度为6 turtle.speed(6)
    # 背景为红色 turtle.bgcolor(
    "red")
    # 画笔的颜色 turtle.color(
    "yellow") picture(-300,200,100,144) picture(-80,260,60,144) picture(-100,180,60,144) picture(-120,100,60,144) picture(-200,50,60,144) # 防止自动关闭 turtle.done()
     
  • 相关阅读:
    shell eval命令
    嘟嘟嘟
    07 linkextractor的基本用法
    rabbitmq消息队列
    5. 哨兵集群
    4.主从同步
    3. redis持久化存储
    2. redis 安全
    1.redis基础
    06. scrapy的Request对象
  • 原文地址:https://www.cnblogs.com/qazwsx833/p/8569737.html
Copyright © 2011-2022 走看看