Toggle navigation
Toggle navigation
Classes
Quizzes
Subjects
Sign in
Sign up
Go
Python
|
Take A Quiz
Toggle navigation
Classes
Quizzes
Subjects
Go
Sign in
|
Sign up
Python
Take a practice test
6 Quiz Set/s
Python
6 Quiz Sets
Python
Python Full Review
Can you answer
25
questions in 10 minutes?
Python Full Review |
1. Parser.add_option('-n - ' - new')
Matches the end of a string
Condition
After we've added options (in parser) - (options - args) = parser.parse_args()
\b
2. High-level language
A programming language like python that is designed to be easy for humans to read and write.
Single character -accepts integer or single char string
Sorts a list from smallest to highest or a string alphabetically
Returns a value for the given key. If key is not available - returns default of 'none'.
3. The _____ coding scheme contains a set of 128 numeric codes that are used to represent characters in the computer memory.
List slicing
Ascii
Catches the exception and executes codes
Do not necessarily output on separate lines.
4. True/false: nested decision structures are one way to test more than one condition.
Matches any numeric digit
True
Input()
Method splits a string into separate phrases - default is to split on whitespace
5. A while-loop is...
Signed integer decimal
Write comments on code ...
An infinite loop.
If parts of the duplicated code have to be corrected - the correction has to be made many times.
6. < - <= - > - >=
Danger! Become super use root! Danger!
A collection of key/value pairs that maps from keys to values.
Less than - less than or equal to - greater than - greater than or equal to
Print to console
7. \n
Gives absolute value of that number (distance from zero)
Float
If elif else
Line character; creates new line in string
8. Variable
Stores a piece of data and gives it a specific name
Separates statements
Start at 1; first - second - third
Eniac
9. Python uses _______________ to categorize values in memory.
Data types
Does nothing
Floating point decimal format (lowercase)
Operating system path module: allows many functions to occur on a specified path. Ex: os.path exists will return a true or false if a file does or doesn't exist
10. What is the disadvantage of coding in one long sequence structure?
Variable
Mechanism or an artificial entity that can be guided by automatic controls.
If parts of the duplicated code have to be corrected - the correction has to be made many times.
End
11. **
0 - 1 - 2 - 3
Exponent
List directory
Compound
12. Os
An immutable sequence of python objects - -immutable; can't be changed - -similar to list - but can't be modified - - uses () - ends in ;
Module - os routines for nt or posix
Creates a new anonymous function
A decimal
13. $
Matches the end of a string
Accumulator
< > <= >= - == !=
Formatting
14. Operators
Special tokens that represent computations like addition - multiplication and division
False
The process of calling the currently executing function.
Copy a file or directory
15. True/false: according to the behavior of integer division - when an integer is divided by an integer - the result will be a float.
True
Floating point numbers
False
An infinite loop.
16. Main memory is commonly known as _______________.
Ram
An error in a program that makes it impossible to parse — and therefore impossible to interpret.
Order of operations: mode of operations: parentheses exponents multiplication division addition subtraction
String format character; use for debugging
17. A(n) ?? Structure causes a statement or set of statements to execute repeatedly.
False
Repetition
False
Returns true if file in argument exists - false if not
18. Min()
Bitwise left shift - -shifts turned on bits to the left - 0b001 << 1 = 0b010
Takes smallest out of a set of numbers and returns it
Priming read
A group of consecutive statements with the same indentation.
19. Argv
Access to all variables and functions in an import without having to type math.function constantly. (from module import *) - con: fill your program with a ton of variables and functions and may not link them correctly to the module (your functions and their functions may get confused)
Deletes key/value pairs from dict
- argument variable - variable holds arguments passed to script when running it
Single character -accepts integer or single char string
20. Treat if statements like...
Let you perform specific tasks on strings
..paragraphs. Each if - elif - and else grouping is like a set of sentences. Put blank lines before and after.
A collection of key/value pairs that maps from keys to values.
- function opens a file - required argument is filename - default access_mode is read(r) - does not return actual content; creates/reads fileobject
21. Readline
S = [x for x in range(1:51) if x%2 == 0]
A method/function/command to read just one line of a text file
The difference has to do with where the user is required to give input. If they give your script inputs on the command line - then you use argv. If you want them to input using the keyboard while the script is running - then use raw_input(). Line 3: Script - first - second - third = argv - Line 3 "unpacks" argv so that - rather than holding all the arguments - it gets assigned to four variables you can work with: script - first - second - and third. This may look strange - but "unpack" is probably the best word to describe what it does. It just says - "take whatever is in argv - unpack it - and assign it to all of these variables on the left in order." (ex13.py)
Input()
22. Short circuit evaluation
Floating point exponential format (uppercase)
When a boolean expression is evaluated the evaluation starts at the left hand expression and proceeds to the right - stopping when it is no longer necessary to evaluate Any further to determine the final outcome.
To follow the flow of execution of a program by hand - recording the change of state of the variables and any output produced.
.index(item)
23. Def check_bit4(input):
3
- erases last character printed
Mask = 0b1000 - desired = input & mask - if desired > 0: return "on" - return "off"
For
24. *
Repetition
If/else
Variable
Asterisk: used for miltiplication
25. Iteration
Does nothing
End
Converts a signed integer decimal
To repeat a section of code.
×
Please login to subscribe
×
Subscribed Successfully
Please login/register to bookmark chapters.
Subjects
Aptitude
Basic Life Skills
High School
Elementary School
Entrance and Placement Exams
Jobs and Occupations
Information Technology
Certifications
Business Skills
Trades and Vocational
Languages
English
Healthcare
Math
Science and Technology
Education Standards and Boards
Humanities
Law
Explore
Browse Fatskills by topics
All Subjects on Fatskills
Popular Tests on Fatskills
Fatskills Career Aptitude Tests
Fatskills Community
About Fatskills
Privacy Policy
Terms of Use
Bighow News
|
Truho
|
The Success Manual
Please report any error in fatskills quizzes and questions to 'simpleversity at gmail.com'.
Without work one finishes nothing. - Ralph Waldo Emerson
© The
Simple
Project 2019