ArcGIS 10: How can I execute the ArcPy code in ArcMap 10?

Hi all,I just used ArcPy to restart in learning the Python Programming in ArcGIS 10. I typed in the following code in the Python Window: >>> import arcpy >>> # this is a comment >>> print ??? hello world???

Please see the attached file.

How can I execute this set of the ArcPY code in ArcMap 10? Where is/are the button/control keys I can press to get the ArcPy execution started? Please help and respond.

Attachments

I pressed the Enter button at the end of my last code statment and I just got the 3 dots (...) appeared after my last code statemenet. What is wrong with my ArcPy program in ArcMap 10? How can I resolve this problem? Please help and respond again.

1) I pressed the Enter button again. It worked and the "hellow world" was printed out. 2) I tried to pick up the ArcPy programming quickly and I used the Tutorial material "Python Programming for ArcGIS" written by David Quinn & Daniel Sheehan (dated: January 27. 2011). Now I tried to do "if statement" coded as the following:x = 2# Condition checks if statement is trueif x == 1: print 'x is 1!'

I made a mistake in typing "if x == 1" but missing ":", before I pressed the Enter button and I got "Parsing error"....Please see the attached file for details. Do I have to type the whole set of the code from the first staement again?3) Also I will try to execute the code statements of the "if/elif/else statement" presented in the Tutorial material "Python Programming for ArcGIS". I wonder whether there is any "continuation" symbol in the ArcPY/Python programming to do the "print 'x is 1!' after "x== 1:" as listed in 2)? [I try to avoid the same mistake in 2) again!]