(파이썬) 뭐가 문제인지 봐주세요 ㄹㅇ 간절함
-
게시물 수정 , 삭제는 로그인 필요
(인풋)
selection = input('Select an operation to perform.\n******************\n(A)dd filters, (P)rint names, (G)raph data, Remove (F)ilter, (E)xit: ')
selection = selection.upper()
while selection != 'E':
if selection == 'A' or selection == 'a':
print('(G)enre, Release (Y)ear, (R)ating: ')
choiceA = input()
if choiceA == 'R' or choiceA == 'r':
print('Choose the rating.: ', Rating)
rating1 = input('From: ')
rating1 = rating1.upper()
for itemR in Rating:
if rating1 != itemR:
print('Error!!! Enter again.')
rating1 = input('From: ')
rating2 = input('To: ')
rating2 = rating2.upper()
for itemR in Rating:
if rating2 != itemR:
print('Error!!! Enter again.')
rating2 = input('To: ')
print(rating1, rating2)
(아웃풋)
Choose the rating.: ['NR', 'G', 'PG', 'PG-13', 'M', 'MA', 'R']
From: R
Error!!! Enter again.
From: NR
Error!!! Enter again.
From: G
Error!!! Enter again.
From: PG
Error!!! Enter again.
From: ma
Error!!! Enter again.
From: g
Error!!! Enter again.
From: pg-13
Error!!! Enter again.
From: PG-13
To: R
Error!!! Enter again.
To: MA
Error!!! Enter again.
To: ma
Error!!! Enter again.
To: m
Error!!! Enter again.
To: MA
Error!!! Enter again.
To: r
Error!!! Enter again.
To: R
PG-13 R
왜 에러가 랜덤으로 뜨죠?
(인풋)
selection = input('Select an operation to perform.\n******************\n(A)dd filters, (P)rint names, (G)raph data, Remove (F)ilter, (E)xit: ')
selection = selection.upper()
while selection != 'E':
if selection == 'A' or selection == 'a':
print('(G)enre, Release (Y)ear, (R)ating: ')
choiceA = input()
if choiceA == 'R' or choiceA == 'r':
print('Choose the rating.: ', Rating)
rating1 = input('From: ')
rating1 = rating1.upper()
for itemR in Rating:
if rating1 != itemR:
print('Error!!! Enter again.')
rating1 = input('From: ')
rating2 = input('To: ')
rating2 = rating2.upper()
for itemR in Rating:
if rating2 != itemR:
print('Error!!! Enter again.')
rating2 = input('To: ')
print(rating1, rating2)
(아웃풋)
Choose the rating.: ['NR', 'G', 'PG', 'PG-13', 'M', 'MA', 'R']
From: R
Error!!! Enter again.
From: NR
Error!!! Enter again.
From: G
Error!!! Enter again.
From: PG
Error!!! Enter again.
From: ma
Error!!! Enter again.
From: g
Error!!! Enter again.
From: pg-13
Error!!! Enter again.
From: PG-13
To: R
Error!!! Enter again.
To: MA
Error!!! Enter again.
To: ma
Error!!! Enter again.
To: m
Error!!! Enter again.
To: MA
Error!!! Enter again.
To: r
Error!!! Enter again.
To: R
PG-13 R
왜 에러가 랜덤으로 뜨죠?