Python --version
to confirm that Python3 has installed on your machine.pip --version
.python
print('Hello World')
. Python will return your statement 'Hello World'.python
to run the Python 3 interpreter. (Some instructions prefer to use the command py
or python3
, these should also work). You will know that you're successful because a >>> prompt with three greater-than symbols will display.variable = 'Hello World!'
. Press Enter for a new line.print(variable)
. This will display the text 'Hello World!'.len(variable)
. This will display that there are 12 characters used. (Note that the blank space it counted as a character in the total length.)variable.upper()
. Now convert your string variable to lower-case letters: variable.lower()
.variable.count('l')
.variable.find('!')
. This will display that the exclamation point is found in the 11th position character of the string.variable.replace('!', '?')
.exit()
, quit()
, or select Ctrl-Z.python -m pip install -U pygame --user
.python -m pygame.examples.aliens
bounce.py
.python bounce.py
.