<｜begin▁of▁sentence｜>### Instruction:
Given a directed graph with edges [('A', 'B', 2), ('B', 'C', 3), ('A', 'C', 1), ('C', 'D', 4)], where each tuple represents an edge with a weight, compute the average degree connectivity of the graph using weights. What is the average connectivity of nodes with the same degree?
### Response:
import networkx as nx

# Create a weighted graph
G = nx.DiGraph()
G.add_edge('A', 'B', weight=2)
G.add_edge('B', 'C', weight=3)
G.add_edge('A', 'C', weight=1)
G.add_edge('C', 'D', weight=4)

# Compute the average degree connectivity for the graph
adc = nx.average_degree_connectivity(G, weight='weight')
print(adc)
<|EOT|>
