How to Work with Variables in Python
Swipe to start coding
You are a teacher organizing classes of students. Each class currently has 45 students, but a new rule has been introduced that limits the number of students per class to 27. You have a total of 6 classes and need to calculate how many classes will be formed.
- Create a variable called
total_students
to store the total number of students. - Calculate the total number of students by multiplying the number of classes by the original number of students per class.
- Create a variable called
total_classes
to store the number of classes needed. - Calculate the number of classes by dividing the total number of students by the new class size of 27.
Lösning
Tack för dina kommentarer!
single
Fråga AI
Fråga AI
Fråga vad du vill eller prova någon av de föreslagna frågorna för att starta vårt samtal
Awesome!
Completion rate improved to 1.67
How to Work with Variables in Python
Svep för att visa menyn
Swipe to start coding
You are a teacher organizing classes of students. Each class currently has 45 students, but a new rule has been introduced that limits the number of students per class to 27. You have a total of 6 classes and need to calculate how many classes will be formed.
- Create a variable called
total_students
to store the total number of students. - Calculate the total number of students by multiplying the number of classes by the original number of students per class.
- Create a variable called
total_classes
to store the number of classes needed. - Calculate the number of classes by dividing the total number of students by the new class size of 27.
Lösning
Tack för dina kommentarer!
Awesome!
Completion rate improved to 1.67single