e-liza-k
?>

Как убрать водяной знак из пдф документ бесплатно? ! большое!

Информатика

Ответы

asparinapti39

import random

ver = 0

while (ver == 0):

   player = int(input("1 - камень, 2 - ножницы, 3 - бумага. "

                      "Введите цифру: "))

   if (player == 1 or player == 2 or player == 3):

       ver = 1

if player == 1:

   print("Вы выбрали камень.")

if player == 2:

   print("Вы выбрали ножницы.")

if player == 3:

   print("Вы выбрали бумагу.")

comp = random.randint(1, 3)

if comp == 1:

   print("Компьютер выбрал камень.")

if comp == 2:

   print("Компьютер выбрал ножницы.")

if comp == 3:

   print("Компьютер выбрал бумагу.")

# определяем победителя

if player == comp:

   win = 0

if player == 1 and comp == 2:

   win = 1

if player == 1 and comp == 3:

   win = 2

if player == 2 and comp == 1:

   win = 2

if player == 2 and comp == 3:

   win = 1

if player == 3 and comp == 1:

   win = 1

if player == 3 and comp == 2:

   win = 2

if win == 0:

   print("Ничья!")

if win == 1:

   print("Победил игрок!")

if win == 2:

   print("Победил компьютер!")

Ladiga_Evgenii886

import random

pc1 = int()

pc2 = int()

# 1 - Камень, 2 - Ножници, 3 - Бумага

part_numbers = int(input('Введите количество партий: '))

part_number_default = 0

pc1_count = 0

pc2_count = 0

draw_count = 0

while part_number_default != part_numbers:

   rock_paper_scissors = random.randint(1,3)

   guess_pc1 = random.randint(1,3)

   guess_pc2 = random.randint(1,3)

   if rock_paper_scissors == guess_pc1:

       pc1_count +=1

   elif rock_paper_scissors == guess_pc2:

       pc2_count +=1

   elif rock_paper_scissors != guess_pc1 and rock_paper_scissors != guess_pc2:

       draw_count += 1

   part_number_default += 1

# Выводим счет

if pc1_count > pc2_count:

   print('Первый компьтер победил!')

elif pc2_count > pc1_count:

   print('Второй компьютер победил!')

elif pc1_count == pc2_count:

   print('Ничья')

print(pc1_count, ': ', pc2_count, '(Ничей в партиях:', draw_count, ')')

Объяснение:

Выполнены все условия кроме второй компьютер всегда выигрывал( не вижу смысла тогда этой игры) но если нужно то это просто сделать, оставить вывод только выиграша второго пк, убать счет.

Ответить на вопрос

Поделитесь своими знаниями, ответьте на вопрос:

Как убрать водяной знак из пдф документ бесплатно? ! большое!
Ваше имя (никнейм)*
Email*
Комментарий*

Популярные вопросы в разделе

valerii-borisovich550
sergei-komissar8475
megaromeo
Yurevich
ev89036973460
alenih13
КузменковаЖигулин
на языке программирование devc++( )
valerii-borisovich550
istok11
Eduard Melikyan
ev89036973460
badalovao256
Сергеевич1907
oksana-popova
annayarikova