Changes

Jump to: navigation, search

OPS435 Python3 Lab 2

234 bytes added, 18:22, 12 September 2019
no edit summary
[[Category:rchan]][[Category:OPS435-Python]
= Under construction - DO NOT USE - not ready yet! =
= LAB OBJECTIVES =
:'''<u>Objectives</u>'''
:Learn the following python topics:
:*'''builtin functions:''' input(), print(), len(), str(), int()
:*'''builtin module:''' sys - special list object sys.argv
:*'''flow control statements and block:''' if, if/else, if/elif/else, while
:*'''code indentation''' - 4 spaces (avoid using tabs)
:Write Python code in order to:
 
:*'''Accept data from users ''' at the command line, such as name and age.
 
:*'''Prompt the user to provide specific data''' from the stdin (standard input channel), such as a username or password.
 
:*'''Process the inputted data''' using '''Conditional Statements'''.
:::This means that the program will change how it behaves based on the input given, an example would be, providing the correct password or providing the wrong password.
 
:*'''Process the inputted data''' using '''Looping Statements'''.
:::Looping (iteration) is the ability for your script to repeatedly run the same block of codes over and over until a given condition is met. For example, an authentication process would allow your 3 attempts to provide the correct password, and it will deny you access after 3 attempts have been tried and failed.
1,760
edits

Navigation menu