Question: Create a flowchart with this python code for the window function! Here is the python code to convert into flowchart below! window _ height =
Create a flowchart with this python code for the window function!
Here is the python code to convert into flowchart below!
windowheight # Height of a window
windowwidth # Width of a window
windowchance # Probability of a building having windows changed
windowchance # Probability of a building having windows changed
lightonchance # Probability of a window being lit changed
lightonchance # Probability of a window being lit changed
windowmargin # Margin from edge of building for windows changed
windowmargin # Margin from edge of building for windows changed
windowgap # Gap between windows changed
windowgap # Gap between windows changed
# windowrows random.randint
windowcolumns random.randint
# windowcolumns random.randint
windowheight buildingHeight windowmargin windowrows
# windowheight buildingHeight windowmargin windowrows
windowwidth buildingWidth windowmargin windowgap windowcolumns windowcolumns
# windowwidth buildingWidth windowmargin windowgap windowcolumns windowcolumns
buildingbasey buildingTurtle.ycor buildingHeight
# buildingbasey buildingTurtle.ycor buildingHeight
buildingleftx buildingTurtle.xcor buildingWidth
# buildingleftx buildingTurtle.xcor buildingWidth
windowrows buildingHeight windowmargin windowgapwindowheight windowgap
windowcolumns buildingWidth windowmargin windowgapwindowwidth windowgap
buildingbasey buildingTurtle.ycor
buildingleftx buildingTurtle.xcor buildingWidth
x buildingleftx col windowwidth col windowgap windowmargin
y buildingbasey row windowheight windowmargin
y buildingbasey row windowheight row windowgap windowmargin
drawRectanglex y windowwidth, windowheight colorwindowColor
drawRectanglex y windowwidth, windowheight, colorwindowColor
floorWidth random.randintwindowwidth windowmarginWIDTH # The floorWidth should have at least one window.
random.randintwindowheight windowmargin intHEIGHT if wallHeight is None else wallHeight # The wallHeight should have at least one window.
Looking forward to the flowchart! Make sure it is only drawing the windows part of the program and have a 'start' and 'end' for the flowchart.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
