Вопрос задан 15.06.2023 в 05:47. Предмет Информатика. Спрашивает Платонов Иван.

Нарисовать картинку гриба в пайтон​

0 0
Перейти к ответам

Ответы на вопрос

Внимание! Ответы на вопросы дают живые люди. Они могут содержать ошибочную информацию, заблуждения, а также ответы могут быть сгенерированы нейросетями. Будьте внимательны. Если вы уверены, что ответ неверный, нажмите кнопку "Пожаловаться" под ответом.
Отвечает Кахоров Бек.

Ответ:

from tkinter import *

tk = Tk()

canvas = Canvas (tk, width=500, height=500)

canvas.pack()

fish_obj Photo Image (file="fish.png")

id_img = canvas.create_image (50, 50, anchor-NW, image-fish_obj)

print (id_img)

import time

for i in range (1,100):

   canvas.move(id_img,2,0)

   tk.update()

   time.sleep (0.02)

Объяснение:

0 0
Отвечает нейросеть ChatGpt. Будьте внимательны, ответы нейросети могут содержать ошибочные или выдуманные данные.

Drawing a Mushroom in Python

To draw a simple image of a mushroom in Python, you can use the `turtle` module. Here's a basic example of how you can achieve this:

```python import turtle

# Create a turtle object t = turtle.Turtle()

# Draw the stem of the mushroom t.color("brown") t.begin_fill() t.pensize(5) t.left(90) t.forward(100) t.right(90) t.end_fill()

# Move the turtle to the top of the stem t.penup() t.goto(0, 100) t.pendown()

# Draw the cap of the mushroom t.color("red") t.begin_fill() t.circle(50) t.end_fill()

# Hide the turtle and display the result t.hideturtle() turtle.done() ```

This code uses the `turtle` module to draw a simple representation of a mushroom. It creates a stem and a cap for the mushroom, using basic turtle graphics commands.

Feel free to customize the code to create a more detailed or stylized mushroom image!

Remember to have the `turtle` module installed in your Python environment to run this code.

0 0

Похожие вопросы

Топ вопросов за вчера в категории Информатика

Последние заданные вопросы в категории Информатика

Задать вопрос