MOD1: H1 - H5 Flashcards
What version of Python am I running?
Python 2.7 (That’s what the BOOK wants for an Answer.)
What is another word for a File “Folder”?
Directory
If I want to edit code in a Text Editor, I should use Microsoft Word or WordPad?
True
False
False
Rich Editors such as Word or Wordpad will destroy your code.
Use Code Editors such as Notepad++ for Windows or TextWrangler on Mac.
Through the command line, create a new folder called “projects” in your home folder. Then, change into that directory and create another folder called “python”.
- Open CMD Line Terminal
- mkdir projects (dir - to confirm new projects directory)
- cd projects
- mkdir python (dir - to confirm new python directory)
In your text editor, create a new file called hello.py in your new python directory (the one you made in Exercise 1). Type print “Hello, world” into it and then save and close it. In your command line, see how big the file is.
- Open CMD Line Terminal
- cd projects
- cd python
- dir
- Find the [hello.py] File and look at the File Size info.
Answer: 24 bytes
A Mastery of Programming and High Level coding is necessary for most Cybersecurity positions?
True
False
False
Programming Awareness means that you can identify programming code, you understanding basic programming constructs and components, such as If/Then Statements and Loops, and can read code and understand in general what the code is trying to do?
True
False
True
Which Text Editor does the Textbook recommend for use with Python?
Notepad Notepad++ WordPad MS Word Google Docs
Notepad++
When working your way through code examples in the Textbook and code presented as part of Canvas-Based Activities, you should copy and write the entire program before proceeding to test and debug your code?
True
False
False
Briefly explain the concept of Unit Testing and why it is important?
Improves the Quality of your code and helps you identify fixable errors and defects.
Define Knowledge Generalization?
The ability to transfer and utilize knowledge across multiple situations.
Takes practice to hone, but highly valued by employers.
How long can a number be?
Number Type is long, and it’s determined by how much memory your machine has. The more numbers it can keep in memory at one time, the longer the number can be.
This shouldn’t be an issue, you would need a number that’s big enough to fill up your available Memory AND your Had Drive, and this would be an enormous number even on the most under-powered machines.
What’s PEP?
Python Enhanced Proposal (PEP)
A document that describes a way in which Python can be made better.
Some don’t affect the language at all (such as the style guide), where as others may add or remove a feature from Python.
What is the difference between = and ==?
== denotes Equals To in a Math scripts to compare values.
= denotes assigning a value to a Variable.
What happens if you add an Integer and a Float?
A Float result is returned by Python.