From 75f3f24a653fc1daa0f3b496daff273177400192 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luiz=20Ot=C3=A1vio?= Date: Fri, 28 Oct 2022 12:18:13 -0300 Subject: [PATCH] =?UTF-8?q?O=20que=20aprendemos=20com=20while=20tamb=C3=A9?= =?UTF-8?q?m=20funciona=20no=20for=20(continue,=20break,=20else,=20etc)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .vscode/settings.json | 12 ++++++------ aula46.py | 13 +++++++++++++ 2 files changed, 19 insertions(+), 6 deletions(-) create mode 100644 aula46.py diff --git a/.vscode/settings.json b/.vscode/settings.json index f278b59..f1d157e 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -18,12 +18,12 @@ "editor.defaultFormatter": "ms-python.python", "editor.tabSize": 4, "editor.insertSpaces": true, - "editor.formatOnSave": true, - "editor.codeActionsOnSave": { - "source.fixAll": true, - "source.fixAll.unusedImports": false, - "source.organizeImports": true - } + "editor.formatOnSave": true + // "editor.codeActionsOnSave": { + // "source.fixAll": true, + // "source.fixAll.unusedImports": false, + // "source.organizeImports": true + // } }, "python.languageServer": "Pylance", "python.formatting.autopep8Args": [ diff --git a/aula46.py b/aula46.py new file mode 100644 index 0000000..54909b9 --- /dev/null +++ b/aula46.py @@ -0,0 +1,13 @@ +for i in range(10): + if i == 2: + print('i é 2, pulando...') + continue + + if i == 8: + print('i é 8, seu else não executará') + break + + for j in range(1, 3): + print(i, j) +else: + print('For completo com sucesso!')