From CDOT Wiki
Jump to: navigation, search

OPS435 Python Lab 1

143 bytes added, 08:22, 16 May 2017
Printing Text
'''Perform the following steps:'''
:#Issue the following commands:
<pre style="margin-left:25px;">
:::Our first python code we will write is the print function. A function is code that has been defined in another location. Functions can take arguments, use these arguments in some way, and then usually return a result. The first function we will use is the "print()" functions, it's sole purpose is to output information to the screen.
:#At the prompt, issue the following python function:
<pre style="margin-left:25px;">
:::You will notice that nothing happened when we ran this "print()" function. This is because we didn't pass any arguments to it, lets try again.
:# Issue the following function:<prestyle="margin-left:25px;">
print('hello world')

Navigation menu