Home > other > Super small white consult an origami highly process problems
Super small white consult an origami highly process problems
Time:09-21
Good big! I am a beginner of python super white, in a small case: by origami fold the height of the paper to the height of mount Everest to practice while statement (program), there is a place not understand: participation in the program of the variable is not p and m, the number of origami count has never been involved in, isn't it, how finally calculate the number of origami count? Hope everybody the teacher for help to reassure, thank humbly!!!!!!
# a piece of paper folded in half, how many times to reach the height of mount Everest P=0.08 M=8844000
Count=0 # records can be folded in half the number While pP=p * 2 The count=count + 1 Print (" times: "the count," height: ", p)
Print (" folded in half the number: ", count, "height:", p)
CodePudding user response:
Each loop The count=count + 1
Is not the count accumulation? How to say the count has never been involved in?