flag =
False
count =
0
while not flag:
num =
float(
input(
'Enter a number: '))
if num >
0:
count +=
1
if count ==
1:
largest_num = num
else:
if largest_num < num:
largest_num = num
else:
flag =
True
if count >
0:
print(
'The largest number entered was', '{:.2f}'.format(largest_num))
else:
print(
'No positive number was entered')
Name 'largest_num' can be undefined 10