Position: Home page » Virtual » How to write virtual currency API interface in Python

How to write virtual currency API interface in Python

Publish: 2021-04-16 23:00:21
1. Python digital currency quantitative trading advanced course, has been learned, generally mastered.
2. Xinwei B3, ant S9, yibit, Shenma, how do you want to mine? brother
3. Go to the official website to register an account - do a risk assessment - and you can recharge your wallet after passing the assessment. You don't need to set the address of the mine.
4. All cryptocurrencies are written in C / C + +, Python is too slow, only for algorithm.
5.

This problem is very simple. You need to add some comments. I don't know how to add them. Let's look at the specific code

< pre t = "code" L = "Python" > # define payment computer class
classpaycalculator:
# initialization method, set hourly wage
def__ init__( self):
self.pay_ Rate = 100

? Calculation method, enter the working hours, and return the salary payable
defcompute_ pay(self,hours):
returnself.pay_ Rate * hours


# define a payment computer object
A = paycalculator()
# when calculating the default hourly wage, 10 hours of work should be paid
Print (a.compute_ Pay (10))
# set hourly wage
A.pay_ rate=20
print(a.compute_ pay(10))
6. This is mainly to be familiar with the basic communication process of socket. The process of socket server side is to establish socket bind to a specific port, listen to specify the number of connections, accept the connection, use read / write after establishing the connection, and then use close to clean up the resource, import socket to import socket library host = & 39&# 39; Indicates that binding is required
7. def func(money):
return f' RMB: 20 US dollars: {money * 20} & # 39

I don't know what you mean, but it's very simple. I don't know what effect you want. You'd better give an example, such as what to input and what to output
8. import random
count = 0 # 1 正面 0 反面 记录1的次数
for i in range(10000000):
n = random.randint(0,1)
if n == 1:
count += 1
print(u'正面{0}次,反面{1}次'.format(count,1000000-count))
9.

From the requirements of the program, we can get five for 50 yuan, six for 5 yuan and three for 1 yuan. It can be directly calculated by operations such as surplus, or solved by greedy thinking, but it is simple to use surplus

correct code:

0 count=283

x = int(count/50)

y = int((count-x*50)/5)

z=count-(x*50)-(y*5)

print(' Change {} yuan, including 50 yuan: {} Zhang, 5 yuan: {} Zhang, 1 yuan: {} Zhang, 39 yuan Format (count, x, y, z))

{rrrrrrr}

extended data:

advantages and disadvantages of Python:

advantages:

1, simple, Python is a language representing the idea of simplicity. Reading a good Python program is like reading English. It allows you to focus on solving problems instead of understanding the language itself

Easy to learn, Python is extremely easy to use, because Python has extremely simple documentation

The bottom layer of Python is written in C language, and many standard libraries and third-party libraries are also written in C, so the running speed is very fast

Python is one of floss (free / open source software). Users are free to publish copies of the software, read its source code, make changes to it, and use part of it in new free software. Floss is based on the concept of a community sharing knowledge

5. High level language. When writing programs in Python, you don't need to consider the bottom details such as how to manage the memory used by your program

Because of its open source nature, python has been transplanted to many platforms (changed to work on different platforms)

Explanatory: a program written in a compiler language such as C or C + + can be converted from a source file (i.e. C or C + + language) to a language (binary code, i.e. 0 and 1) used by your computer. This process is accomplished through the compiler and different tags and options

8, standard code, python uses the way of forced indentation to make the code have better readability. Programs written in Python do not need to be compiled into binary code

disadvantages:

slow running speed: here, compared with C and C + +

source: Internet Python

Hot content
Inn digger Publish: 2021-05-29 20:04:36 Views: 341
Purchase of virtual currency in trust contract dispute Publish: 2021-05-29 20:04:33 Views: 942
Blockchain trust machine Publish: 2021-05-29 20:04:26 Views: 720
Brief introduction of ant mine Publish: 2021-05-29 20:04:25 Views: 848
Will digital currency open in November Publish: 2021-05-29 19:56:16 Views: 861
Global digital currency asset exchange Publish: 2021-05-29 19:54:29 Views: 603
Mining chip machine S11 Publish: 2021-05-29 19:54:26 Views: 945
Ethereum algorithm Sha3 Publish: 2021-05-29 19:52:40 Views: 643
Talking about blockchain is not reliable Publish: 2021-05-29 19:52:26 Views: 754
Mining machine node query Publish: 2021-05-29 19:36:37 Views: 750