I created a data quantity calculator.
(我创建了一个数据量计算器。)
I want, that I input a number and the number is assign to a function. (我想要输入一个数字并将数字分配给一个函数。)
For example: inputChose your input 1 and I get the bit calculator. (例如:input选择您的输入1,我得到位计算器。)
input("Choose your calculator") and then 1 is assign to the bit calculator (输入(“选择您的计算器”),然后将1分配给位计算器)
#Tebibyte Calculator
def tebi():
x = int(input("Please enter number of tebibytes")))
# y = Bit, z = Byte, a = Kibibytes, b = Mebibytes, c = Gibibytes
y = x * 8,796*10**9
z = x * 1.1*10**12
a = x * 1.1*10**9
b = x * 1,1049*10**9
c = x * 1024
# Output of invoices
print(
x, "Tebibyte :", y, "Bits
",
x, "Tebibyte :", z, "Byte
",
x, "Tebibyte :", a, "Kibibyte
",
x, "Tebibyte :", b, "Mebibyte
",
x, "Tebibyte :", c, "Gibibytes"
)
input("Please choose your converter
"
"1 - Input in Bit
"
"2 - Input in Byte
"
"3 - Input in Kibibyte
"
"4 - Input in Mebibyte
"
"5 - Input in Gibibyte
"
"6 - Input in Tebibyte
"
"0 - Exit"
)
6 = tebi()
ask by TheTjschulze translate from so 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…