From 36956e963aa42ccb37c3ea6d536db66609d799f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luiz=20Ot=C3=A1vio?= Date: Thu, 27 Oct 2022 13:53:17 -0300 Subject: [PATCH] =?UTF-8?q?while=20e=20break=20-=20Estrutura=20de=20repeti?= =?UTF-8?q?=C3=A7=C3=A3o=20(Parte=201)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- aula34.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 aula34.py diff --git a/aula34.py b/aula34.py new file mode 100644 index 0000000..1d9f919 --- /dev/null +++ b/aula34.py @@ -0,0 +1,16 @@ +""" +Repetições +while (enquanto) +Executa uma ação enquanto uma condição for verdadeira +Loop infinito -> Quando um código não tem fim +""" +condicao = True + +while condicao: + nome = input('Qual o seu nome: ') + print(f'Seu nome é {nome}') + + if nome == 'sair': + break + +print('Acabou')