Найти - Пользователи
Полная версия: Проблема выхода из цикла
Начало » Python для новичков » Проблема выхода из цикла
1
qweek2
написал элементарный цикл в p3.1.2, но невозможно из него выйти. где ошибка?
a=0
while a<2:
import random
b=random.randint(0,9)
c=random.randint(0,9)
print (b,'X',c)
d=input()
if d==b*c:
a=a+1
ta
import random

a=0

while a<2:
b=random.randint(0,9)
c=random.randint(0,9)

#print (b,'X',c)
print "%s 'X' %s" % (b, c)

#d=input()
d = int(raw_input(">> "))

if d==b*c:
a=a+1
$ python 2.py
3 'X' 9
>> 27
8 'X' 4
>> 32
$
o7412369815963
qweek2
где ошибка?
в ответах? =)
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB