<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described below step by step
<END_TASK>
<USER_TASK:>
Description:
 Numbers
Today we shall be discussing floats and integers. The good news is that most of the stuff we shall be covering today should be intuitive. Okay, let’s get moving... 
Integers
Integers are whole numbers like -6, 10, 1066 etc. In Python, integers work much in the same way they do in mathematics.
There are two main ways to create integers within Python
Step1:  The int() function also takes an optional argument base as well.  So for example “1111”, base=2 will treat “1111” as a binary number and will return whatever that number is in base 10.
Step2:  If we give the int function a float (more on them later) it will return the integer part of the number. Take care to note it always rounds down.
Step3:  Integer Methods
If we have two integer numbers (lets say A and B), then you probably won't be suprised to hear that we can add, subtract, and multiply those numbers together. The symbols for those commands are as follows
Step4:  Modular Arithmetic
Modular Arithmetic is something you can learn more about here. I’m going to skip most of the math and just show you a few common uses
Step6:  Integer Divsion
Integer division returns the whole number part of  A / B.  for example, 10 // 6 is 1 because 6 fits into 10 exactly once (12 // 6 is of course 2). 
So modulo in conjunction with integer division can get you both the whole part of A/B and the remainder of A/B
10 // 6  = 1
10 % 6   = 4 
10 / 6   = 1.6666666666666667
Combine these two operations and you can make a nice clock
Step7:  Floats
What are floating-point numbers? 
Well, they are a bit like decimal numbers in Math (Warning! this is an over-simplification, in numbers part 2 I will go into more depth). 
Just like Integers there are two main ways to create them
Step8:  Dividing by Zero
Dividing by zero is something you are not allowed to do in mathmatics, Python is no different. If you try and divide by zero Python will simply throw and error. If you try to modulo by zero or use integer divsion you will get the same error.
Step9:  Order of Operations
The order of operations (sorted by highest-to-lowerest precidence) in Python is the following
Step10:  So thats some basic mathmatics for you. Python does have support for fractions, complex numbers and a bunch of other stuff as well. But if you want that functionality you have to go hunting for it. 
For example, suppose I want the log(x) or the sqrt(x) what can I do?
<ASSISTANT_TASK:>
Python Code:
string_number = "1066"
integer = int(string_number)
print(int(integer))
print(type(integer))  # <-- the type function returns the type of the object passed in eg 1 is an integer, "hi" is a string, etc.
Explanation: Numbers
Today we shall be discussing floats and integers. The good news is that most of the stuff we shall be covering today should be intuitive. Okay, let’s get moving... 
Integers
Integers are whole numbers like -6, 10, 1066 etc. In Python, integers work much in the same way they do in mathematics.
There are two main ways to create integers within Python:
Just type a number into the console. Yeah, its that easy!
use a special built-in function called 'int'. 
Every data-type in Python has a function that can be used to convert objects into that type, for example, lists have the list() function, strings have the str() function and so on. Unsurprisingly then int() is used to convert non-integers into integers. For example, if I have the string “1066” I can use int() to convert it.
End of explanation
int("1111", base = 2)
Explanation: The int() function also takes an optional argument base as well.  So for example “1111”, base=2 will treat “1111” as a binary number and will return whatever that number is in base 10.
End of explanation
int(6.99999999999999)
Explanation: If we give the int function a float (more on them later) it will return the integer part of the number. Take care to note it always rounds down.
End of explanation
a = 10
b = 5
print(a +  b)  # addition
print(a -  b)  # subtraction
print(a *  b)  # multiplication
print(a ** b)  # exponentation
print(a %  b)  # modular arithmetic
print(a /  b)  # divsion (note, returns a float! Also, Python2 and Python3 act differently here, so beware!)
print(a // b)  # integer division
# For negative numbers, just add a "-" symbol before the number, for example:
print(-a, a) 
Explanation: Integer Methods
If we have two integer numbers (lets say A and B), then you probably won't be suprised to hear that we can add, subtract, and multiply those numbers together. The symbols for those commands are as follows:
End of explanation
# Grabbing the last digit:
print(123423420 % 10)
print(1234234231 % 10)
print(12342342302 % 10)
print(123423423023 % 10)
print(1234234230244 % 10)
print(12342342302445 % 10)
print("\n")
# Grabbing the last 3 digits:
print(12342342302445 % 1000)
print(1234234230244 % 1000)
print(123423423023 % 1000) # <-- note 0 is dropped, integers cannot start with a 0. Thus 023 is simply 23
print("\n")
# grabbing the last 6 digits
print(12342342302 % 1000000)
print(123423423 % 1000000)
print(1234567 % 1000000)
print(12345 % 1000000)
Explanation: Modular Arithmetic
Modular Arithmetic is something you can learn more about here. I’m going to skip most of the math and just show you a few common uses:
Work out if B is a divisor of A  (If not, we get the remainder)
Creating numerical cycles (eg, 121212121...)
Grabbing the last n digits of a number.
divisors...
A % B gives the remainder of A / B. Thus if A % B is 0 then that means the B must be a divisor of A. Ergo if x % 2 equals zero then that means x is an even number. 
'cycles'...
As for cycles, an obvious use for this is stuff like measuring time, a clocks hand resets after hitting 60:
58 % 60 = 58
59 % 60 = 59
60 % 60 = 0    ←- count ‘resets’
61 % 60 = 1
62 % 60 = 2
Once we hit 61 secs then we would prefer to set the secs timer back to zero and update minutes. thus 61 secs becomes 1min 1sec
getting n last digits...
And finally, you can get last digits of a number by using x % (power of 10). A load of examples are printed in the console below.
End of explanation
def time(time):
    time measured in total elapsed minutes, function converts to days, hours, mins
    t = time // 60
    days  = t // 24 # 24 hours in a day
    hours = t %  24 # after working out number of days, get leftover hours
    mins =  time % 60
    return "Input in mins = '{}' which is: {} days {} hours and {} mins".format(time, days, hours, str(mins).zfill(2))
print(time(1))
print(time(60))
print(time(61))
print(time(960))
print(time(1440))
print(time(1447))
print(time(33456456))
Explanation: Integer Divsion
Integer division returns the whole number part of  A / B.  for example, 10 // 6 is 1 because 6 fits into 10 exactly once (12 // 6 is of course 2). 
So modulo in conjunction with integer division can get you both the whole part of A/B and the remainder of A/B
10 // 6  = 1
10 % 6   = 4 
10 / 6   = 1.6666666666666667
Combine these two operations and you can make a nice clock:
End of explanation
string_number = "10.66"
print(float(string_number))
print(float(-3.2e20)) # < -- Python supports scientific notation...
print(float('inf'))   # < -- Python also has a way of representing infinity
print(float(0), float(10), float(5), sep="\n") # notice that when 'float' gets an integer as input '.0' is added to the number
Explanation: Floats
What are floating-point numbers? 
Well, they are a bit like decimal numbers in Math (Warning! this is an over-simplification, in numbers part 2 I will go into more depth). 
Just like Integers there are two main ways to create them:
Just type a floating point number, e.g 3.14
Or we can use the 'float' built-in method
Floats have more or less the same methods as integers do (e.g +-/*%//). Similarly the float() function works remarkably similar to the int function.
End of explanation
30 / 0
30 % 0
30 // 0
Explanation: Dividing by Zero
Dividing by zero is something you are not allowed to do in mathmatics, Python is no different. If you try and divide by zero Python will simply throw and error. If you try to modulo by zero or use integer divsion you will get the same error.
End of explanation
## The only difference a-through-f is where we put a pair of parentheses.
a = 30 - 6 ** 4 * 30 + 20 / 2 
b = (30 - 6) ** 4 * 30 + 20 / 2 
c = 30 - 6 ** (4 * 30) + 20 / 2 
d = 30 - 6 ** 4 * (30 + 20) / 2 
e = 30 - 6 ** (4 * 30 + 20 / 2) 
f = 30 - (6 ** 4 * 30 + 20 / 2) 
print(a, b, c, d, e, f, sep= "\n")
Explanation: Order of Operations
The order of operations (sorted by highest-to-lowerest precidence) in Python is the following:
Parentheses
Exponentiation
Multiplication
Division
Addition
Subtraction
A few examples...
End of explanation
from math import log2, sqrt
print(sqrt(100))
## Alternatively, you can also get the square root of a number by raising it to the 0.5 power
print(100**0.5)
print(log2(100))
Explanation: So thats some basic mathmatics for you. Python does have support for fractions, complex numbers and a bunch of other stuff as well. But if you want that functionality you have to go hunting for it. 
For example, suppose I want the log(x) or the sqrt(x) what can I do?
End of explanation
<END_TASK>