
Behavior as Usual
My mood was much better after visiting the basement. In this dark and grim world, I finally had at least one hope to hold onto - the hope that there was at least a chance that I could make it back to my own time.
For a few days after getting into the basement and back out again, I engaged in some people-watching whenever I moved around the base. By the looks of it, no one had particularly noticed my absence, which meant that I should be able to continue helping Noname to restore his modules without drawing suspicion.
Jessica was heading toward me in the corridor. "Hi, Teo. You look so enthusiastic today!"
"Thanks, you look pretty chipper yourself!" I returned. I suddenly noticed that everyone other than me was headed in the other direction. "Where's everyone going?" I asked.
"Ritchie returned from an expedition and said he had something to show off. He called a meeting in the big kitchen at..." Jessica looked at her watch, "Now! Let's go!" I turned on my heels and tried to keep up.
The Types
Ritchie was standing at the front of the kitchen, and most of the tables were full. People were still trickling in little by little, and everyone was waiting for him to begin. Finally:
"Hello, everyone! Thank you all for coming on such short notice. I've just returned from the machine city, and an ally of ours shared some intel they've been working on obtaining for a while. It turns out there are many more types than just boolean, integer, and string.
"More? Really?" Someone from the crowd called. Ritchie replied, "Yes, many more. Let's start simple and go over the float type. It represents a real number, sometimes referred to as a floating-point number (this is where the name 'float' comes from). For example," at this, Ritchie uncapped a marker and began writing on the whiteboard behind him, "numbers like 2.5, 17.9456, and 0.7 are real numbers."
"Why would we need such complexity?" someone asked, mirroring my thoughts. "I use integer variables in all my programs and everything seems to work fine!"
Ritchie had clearly anticipated this question. "In our world, the primary currency is viruses. Every number of viruses is an integer number. You can have 2, 5, or 10 viruses, but not 2.5, right? That's why you think in terms of the integer type. Before our time though, people had a currency - the dollar - to calculate their money. You could have 1.50 dollars, or 1.63 dollars, rather than just 1 or 2. If you create a variable and store a real number in it, it will be a float variable:"
my_money = 187.54

He continued, "I know it seems complicated, but you can add, subtract, divide, and multiply float variables just as you do with integers."
my_money = 10.25
four_times_my_money = 10.25 * 4.0
print(four_times_my_money) # Outputs 41.0
decreased_money = my_money - 1.25
print(decreased_money) # Outputs 9.0
divided_money = decreased_money / 2
print(divided_money) # Outputs 4.5
add_to_my_money = divided_money + 100.34
print(add_to_my_money) # Outputs 104.84
This isn't any different than how you do things outside of coding. We can add integers and real numbers, subtract them, divide them, and multiply them without any hiccups.
Everyone in the room was nodding. Ritchie asked us to try creating a float variable and then output it to the screen.
If you want to read a float from the screen, use the method float(...) just as you used int(...). Here is an example:
number_string = input()
number = float(number_string)

After walking around to ensure we had grasped the new concepts, Ritchie returned to the front of the room. "Let's wrap up our meeting," Ritchie said. "Complete this next task and then take a break. We'll delve into more new types later."
