Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
If/Else | Introduction to Python 2/2
Introduction to Python for Data Analysis
course content

Зміст курсу

Introduction to Python for Data Analysis

Introduction to Python for Data Analysis

1. Introduction to Python 1/2
2. Introduction to Python 2/2
3. Explore Dataset
4. Becoming an Analyst

If/Else

carousel-imgcarousel-img

To implement this situation with the help of Python we can use the next code:

Now we will implement if/else to find updated prices (with different discounts) for the subscriptions.

Завдання

Analysts decided to update subscription prices.

They want to set a 25% discount if the price is higher than 25. In other cases, they want to set a 10% discount.

  1. Set the condition if the price is greater than 25.
  2. Set the 25% discount if the price is greater than 25. !
  3. Otherwise, set the 10% discount.
  4. Print the price_upd.

! To set the 25% discount use value * 0.75

Завдання

Analysts decided to update subscription prices.

They want to set a 25% discount if the price is higher than 25. In other cases, they want to set a 10% discount.

  1. Set the condition if the price is greater than 25.
  2. Set the 25% discount if the price is greater than 25. !
  3. Otherwise, set the 10% discount.
  4. Print the price_upd.

! To set the 25% discount use value * 0.75

Все було зрозуміло?

Секція 2. Розділ 1
toggle bottom row

If/Else

carousel-imgcarousel-img

To implement this situation with the help of Python we can use the next code:

Now we will implement if/else to find updated prices (with different discounts) for the subscriptions.

Завдання

Analysts decided to update subscription prices.

They want to set a 25% discount if the price is higher than 25. In other cases, they want to set a 10% discount.

  1. Set the condition if the price is greater than 25.
  2. Set the 25% discount if the price is greater than 25. !
  3. Otherwise, set the 10% discount.
  4. Print the price_upd.

! To set the 25% discount use value * 0.75

Завдання

Analysts decided to update subscription prices.

They want to set a 25% discount if the price is higher than 25. In other cases, they want to set a 10% discount.

  1. Set the condition if the price is greater than 25.
  2. Set the 25% discount if the price is greater than 25. !
  3. Otherwise, set the 10% discount.
  4. Print the price_upd.

! To set the 25% discount use value * 0.75

Все було зрозуміло?

Секція 2. Розділ 1
toggle bottom row

If/Else

carousel-imgcarousel-img

To implement this situation with the help of Python we can use the next code:

Now we will implement if/else to find updated prices (with different discounts) for the subscriptions.

Завдання

Analysts decided to update subscription prices.

They want to set a 25% discount if the price is higher than 25. In other cases, they want to set a 10% discount.

  1. Set the condition if the price is greater than 25.
  2. Set the 25% discount if the price is greater than 25. !
  3. Otherwise, set the 10% discount.
  4. Print the price_upd.

! To set the 25% discount use value * 0.75

Завдання

Analysts decided to update subscription prices.

They want to set a 25% discount if the price is higher than 25. In other cases, they want to set a 10% discount.

  1. Set the condition if the price is greater than 25.
  2. Set the 25% discount if the price is greater than 25. !
  3. Otherwise, set the 10% discount.
  4. Print the price_upd.

! To set the 25% discount use value * 0.75

Все було зрозуміло?

carousel-imgcarousel-img

To implement this situation with the help of Python we can use the next code:

Now we will implement if/else to find updated prices (with different discounts) for the subscriptions.

Завдання

Analysts decided to update subscription prices.

They want to set a 25% discount if the price is higher than 25. In other cases, they want to set a 10% discount.

  1. Set the condition if the price is greater than 25.
  2. Set the 25% discount if the price is greater than 25. !
  3. Otherwise, set the 10% discount.
  4. Print the price_upd.

! To set the 25% discount use value * 0.75

Секція 2. Розділ 1
Перейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів
We're sorry to hear that something went wrong. What happened?
some-alt