subject
Engineering, 23.10.2019 23:00 alexius6608

#read the dimension of the grid dim = in_file. readline() dim = dim. strip() dim = int(dim) # create an empty grid grid = [] # populate the grid for i in range (dim): line = in_file. readline() line = line. strip() row = line. split() for j in range (dim): row[j] = int (row[j]) grid. append (row) # close the file in_file. close() # get the number of paths in the grid and print num_paths = count_paths (dim, 0, 0) print ('number of paths in a grid of dimension', dim, 'is', num_paths) print () # get the maximum path sum and print max_path_sum = path_sum (grid, dim, 0, 0) print ('greatest path sum is', max_path_sum)

ansver
Answers: 1

Another question on Engineering

question
Engineering, 04.07.2019 18:10
Burgers vector is generally parallel to the dislocation line. a)-true b)-false
Answers: 2
question
Engineering, 04.07.2019 18:10
Which of the following controllers anticipates the future from the slope of errors over time? a)-proportional b)-on/off c)-integral d)-derivative.
Answers: 2
question
Engineering, 04.07.2019 18:10
True or false (explain) (110)[111] is a slip system in bcc metals . the {111} family in fcc contains 8 planes. resolved shear stress (rss) in single crystals is just related to the applied stress. critical resolved shear stress (crss) in single crystal metals is direct proportional to the number of defects in the structure
Answers: 2
question
Engineering, 04.07.2019 19:20
Air enters a horizontal, constant-diameter heating duct operating at steady state at 290 k, 1 bar, with a volumetric flow rate of 0.25 m°/s, and exits at 325 k, 0.95 bar. the flow area is 0.04 m2. assuming the ideal gas model with k = 1.4 for the air, determine (a) the velocity at the inlet and exit, each in m/s, and (c) the rate of heat transfer, in kw flow rate, in kg/s, (b) the mass kg 0.3
Answers: 2
You know the right answer?
#read the dimension of the grid dim = in_file. readline() dim = dim. strip() dim = int(dim) # create...
Questions
question
Computers and Technology, 07.11.2019 22:31
Questions on the website: 13722367