About 684,000 results
Open links in new tab
  1. Python 3 Jupyter Notebook "if" statement - Stack Overflow

    Feb 21, 2017 · I am trying to create an "if" statement. But it comes back with an error. I have tried the same statement in pycharm and it works. I use jupyter notebook so that it tells my any …

  2. 3. Decision Making With if, else, and elif — Python for Scientific ...

    To move beyond using Python to execute a simple sequence of commands, two new algorithmic features are needed: decision making and repetition (with variation). In this unit we look at …

  3. Python Statements - notebook.community

    x = 1 if x >= 0: print(x,"is positive number") else: print(x,"is negative number") print('End of if..else..') End of if..else.. The for loop statement is used to iterate over a sequence data type …

  4. Python if, if...else Statement (With Examples) - Programiz

    In computer programming, we use the if statement to run a block of code only when a specific condition is met. In this tutorial, we will learn about Python if...else statements with the help of …

  5. If-Else Conditions - — Jupyter Lab + Python

    We can condition our data using if-else statements and switch cases. If-else statements allow us to do different things if a certain criterion is met or not. We can count the odds and evens in …

  6. Conditional Statements in Python

    In this step-by-step tutorial you'll learn how to work with conditional ("if") statements in Python. Master if-statements and see how to write complex decision making code in your programs.

  7. 02-if, elif, and else Statements - datasciencelovers.com

    Take note of how the if, elif, and else line up in the code. This can help you see what if is related to what elif or else statements. We'll reintroduce a comparison syntax for Python. loc = 'Bank' …

  8. if, elif, and else statements — Learn to code with an Introduction …

    In this section we will learn about if, elif, and else statements in Python. This is where things start to get interesting because now we will have the ability to use more complex logic and decision …

  9. CoCalc -- 02-if, elif, and else Statements.ipynb

    We write this out in a nested structure. Take note of how the if, elif, and else line up in the code. This can help you see what if is related to what elif or else statements. We'll reintroduce a …

  10. Jupyter If Statements - University of British Columbia

    All you need to do is use the 'input()' statement. val = input("Enter your value: ") if val == 'y': print('yes') elif val == 'n': print('no') else: print('invalid response')

  11. Some results have been removed
Refresh