Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Impara How to Work with Variables in Python | Variables and Types in Python
Introduction to Python (dev copy)
course content

Contenuti del Corso

Introduction to Python (dev copy)

Introduction to Python (dev copy)

1. First Acquaintance with Python
2. Variables and Types in Python
3. Conditional Statements in Python
4. Other Data Types in Python
5. Loops in Python
6. Functions in Python

book
How to Work with Variables in Python

Imagine you got the cost of an item saved in the price variable and you want to apply a 15% discount. You can simply reassign the updated value like this:

1234567
# Initial price price = 50 # Applying the discount price = price * (1 - 0.15) print(price)
copy
Compito

Swipe to start coding

  1. A teacher is dividing 47 students into groups of 6. Your task is to determine how many students will not fit into a complete group and store this remainder in the students variable.

Soluzione

Switch to desktopCambia al desktop per esercitarti nel mondo realeContinua da dove ti trovi utilizzando una delle opzioni seguenti
Tutto è chiaro?

Come possiamo migliorarlo?

Grazie per i tuoi commenti!

Sezione 2. Capitolo 3
toggle bottom row

book
How to Work with Variables in Python

Imagine you got the cost of an item saved in the price variable and you want to apply a 15% discount. You can simply reassign the updated value like this:

1234567
# Initial price price = 50 # Applying the discount price = price * (1 - 0.15) print(price)
copy
Compito

Swipe to start coding

  1. A teacher is dividing 47 students into groups of 6. Your task is to determine how many students will not fit into a complete group and store this remainder in the students variable.

Soluzione

Switch to desktopCambia al desktop per esercitarti nel mondo realeContinua da dove ti trovi utilizzando una delle opzioni seguenti
Tutto è chiaro?

Come possiamo migliorarlo?

Grazie per i tuoi commenti!

Sezione 2. Capitolo 3
Switch to desktopCambia al desktop per esercitarti nel mondo realeContinua da dove ti trovi utilizzando una delle opzioni seguenti
Siamo spiacenti che qualcosa sia andato storto. Cosa è successo?
some-alt