Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
TrueとFalseでこんがらがらう
#空文字はFalseだからnot空文字はTrue
name = ''
while not name:
print('名前を入力してください: ')
name = input()
print('OK')
#0はFalseだから0以外はTrue
print('同伴者は何人ですか?')
num_of_guests = int(input())
if num_of_guests:
print('同伴者用の場所があるか確認してください。')
print('受け付けました')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.