Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Lab_III_3_24_11_2020
#python 3.6.9 print ("Hello, world!") print("i like this subject but i do understand well ") # Anand Panchal has started it all. graph = { "a" : ["c"], "b" : ["c", "e"], "c" : ["a", "b", "d", "e"], "d" : ["c"], "e" : ["c", "b"], "f" : [] } print(graph ["c"]) #Arman Kitarov print(graph.keys()) for key in graph: print(key, graph[key]) #Brian Bvunza def generate_edges(graph): edges = [] no_app = 0 for node in graph: for neighbour in graph[node]: edges.append((node, neighbour)) no_app += 1 print("Total numbers of appends: ", no_app) return edges print(generate_edges(graph)) #Eldiiar Sourbaev 48273 graph1 = { "1" : [], "2" : [], "3" : [], "4" : [] } print(generate_edges(graph1)) #Fatih Demir 47926
run
|
edit
|
history
|
help
0
HW selectionsort using while
StAr
Insertion sort
Python
M
permutations example
max area rectangle
Сумма цифр пятизначного числа
Atur cara mengira luas dan isipadu sebuah trapezium
Game4