It was 7 AM at NECOZ School. Everyone was excited because today was the biggest school picnic ever! π₯³
All 30 Cats arrived at school with their bags. One brought chips, another brought chocolates, and one Cat even brought a pillow!
But here was the biggest surprise: King Nyaomaru was also joining the picnic! π
The teacher shouted, "Everyone, get ready and find your seats!"
One Cat replied, "Teacher, someone is already sleeping on my seat!" π
And just like that, the NECOZ adventure began!
π’ 1. Integer β How Many Students?
The teacher started counting all the Cats.
students = 30
buses = 2
An Integer stores whole numbers.
King Nyaomaru said, "30 Students and 2 Buses! Perfect!"
Suddenly, a Cat shouted, "Your Majesty! One Cat is sitting across THREE seats!" π
π° 2. Float β The Picnic Budget
The King checked the picnic budget.
budget = 1500.50
A Float stores decimal numbers.
The King said, "We have enough money for Pizza!"
One Cat immediately shouted, "Please reserve TWO pizzas for me!" π
π¬ 3. String β Everyone's Names
The teacher opened the attendance register.
king = "Nyaomaru"
school = "NECOZ School"
favorite_food = "Pizza"
A String stores text, such as names and words.
The teacher asked, "Who is Nyaomaru?"
All the Cats shouted together, "OUR KING!" π
π€ 4. Boolean β Is Everyone Present?
The teacher checked the attendance.
all_students_present = True
Boolean has only two possible values:
TrueFalse
The teacher announced, "Everyone is here!"
Suddenly, a voice came from the top of the bus.
"TEACHER! I'M HERE TOO!"
π 5. List β The Lunch Box Army
All the Cats opened their lunch boxes.
lunch_boxes = ["Pizza", "Burger", "Sandwich", "Juice"]
A List stores multiple items in one variable.
One Cat said, "My lunch box has something special!"
The teacher asked, "What is it?"
The Cat replied, "HUNGER!"
π 6. Tuple β The Picnic Schedule
The teacher prepared the picnic schedule.
schedule = ("Breakfast", "Games", "Lunch", "Photography")
A Tuple stores multiple items, but its elements cannot be changed after creation.
The King said, "Excellent schedule!"
One Cat asked, "Where is sleeping time?" π΄
π 7. Dictionary β Student Information
The teacher decided to record information about the King.
king = {
"name": "Nyaomaru",
"planet": "NECOZ",
"color": "Green",
"role": "King"
}
A Dictionary stores information in Key-Value pairs.
The King said, "Wonderful! My entire information is in one place!"
π 8. Set β No Duplicate Fruits!
The teacher asked everyone to write down their favourite fruits.
fruits = {"Apple", "Mango", "Banana", "Apple"}
A Set stores unique items. Duplicate values are automatically removed.
So Apple appears only once!
One Cat shouted, "But I WANT TWO MANGOS!"
π³ 9. NoneType β Nothing Assigned Yet!
The teacher reserved a seat for a Cat, but its seat number was not decided yet.
seat_number = None
None represents the absence of a value.
The Cat asked, "Teacher, where is my seat?"
The teacher replied, "Don't worry! We will find one!"
π THE BIG PICNIC TWIST!
Finally, all the Cats reached the picnic spot.
King Nyaomaru announced:
"Today, nobody is allowed to do Coding!"
But suddenly, one Cat opened its laptop.
The King asked, "CODING? Even at a picnic?"
The Cat replied:
"Your Majesty, I am just learning Python!"
The King thought for a moment and announced:
"FINE! FIRST PIZZA, THEN PYTHON!" ππ
And that was how the NECOZ School Picnic became legendary!
π§ Python Data Types β
| Data Type | Example |
|---|---|
Integer (int) |
30 |
Float (float) |
1500.50 |
String (str) |
"Nyaomaru" |
Boolean (bool) |
True |
List (list) |
[1, 2, 3] |
Tuple (tuple) |
(1, 2, 3) |
Dictionary (dict) |
{"name": "Tom"} |
Set (set) |
{1, 2, 3} |
| NoneType | None |
Top comments (0)