Есть ответ 👍

From turtle import * from random import *

t = Turtle()

t.penup()

t.goto(-100,100)

t.pendown()

t.speed(100)

#поле

for i in range(0,15):

t.write(i)

t.right(90)

t.forward(200)

#возврат

t.left(180)

t.forward(200)

t.right(90)

t.forward(20)

first=Turtle()

first.shape("turtle")

first.color("red")

first.penup()

first.goto(-120,70)

first.pendown()

second=Turtle()

second.shape("turtle")

second.color("blue")

second.penup()

second.goto(-120,40)

second.pendown()

third=Turtle()

third.shape("turtle")

third.color("yellow")

third.penup()

third.goto(-120,-20)

third.pendown()

four=Turtle()

four.shape("turtle")

four.color("green")

four.penup()

four.goto(-120,-50)

four.pendown()

five=Turtle()

five.shape("turtle")

five.color("purple")

five.penup()

five.goto(-120,-80)

five.pendown()

#зрители

bolCount = randint(1,10)

for i in range(0, bolCount):

bol = Turtle()

bol.shape("turtle")

bol.color(randint(0,255),randint(0,255),randint(0,255))

bol.penup()

bol.goto(-90+25*i, -120)

bol.pendown()

bol.left(90)

x_first=0

x_second=0

x_third = 0

x_four = 0

x_five = 0

text = input('Прогноз, какая черепаха победит?')

tex = Turtle()

tex.penup()

tex.goto(-120,120)

tex.hideturtle()

tex.write('Ты считаешь, что победит ' + text, font = ('Arial', 12, 'bold'))

while ((x_first<305) and (x_second<305) and (x_third<305) and (x_four<305) and x_five<305):

first_step = randint(1,5)

x_first += first_step

first.forward(first_step)

second_step = randint(1,5)

x_second += second_step

second.forward(second_step)

third_step = randint(1,5)

x_third += third_step

third.forward(third_step)

four_step = randint(1,5)

x_four += four_step

four.forward(four_step)

five_step = randint(1,5)

x_five += five_step

five.forward(five_step)

по этому коду надо выполнить задание:

С консоли мы можем угадать, какая черепашка победит, а с программы мы можем это однозначно определить!

Давай по завершению гонки выводить в консоль и на экран какая черешка победила.
язык python

183
347
Посмотреть ответы 1

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

Silwashka99
4,8(23 оценок)

var

  a, b: real;   //два действительных числа

 

begin

  writeln('введите два числа');

  readln(a, b);   //вводим 2 любых числа

  if a < b then writeln('n = 1');   //если а < b, тогда печатаем 'n = 1'

  if b < a then writeln('n = 2');   //если b < a, тогда печатаем 'n = 2'

  if a = b then writeln('числа равны');   //если a = b, тогда печатаем 'числа равны'

end.

отметь решение как лучшее)

Популярно: Информатика