gutcode-blog
gutcode-blog
GUTCODE
6 posts
A BLOG FOR CODE
Don't wanna be here? Send us removal request.
gutcode-blog · 7 years ago
Text
Quiz for CS1101
A general process for solving a category of problems. - algorithm
An error in a program. - bug
An intermediate language between source code and object code. - byte code
To translate a program written in a high-level language into a low-level language all at once, in preparation for later execution. - compile
The process of finding and removing any of the three kinds of programming errors. - debugging
Another name for a runtime error. - exception
Another name for object code that is ready to be executed. - executable
Any one of the languages that people have designed for specific purposes, such as representing mathematical ideas or computer programs; all programming languages are this kind of languages. - formal language
A programming language like Python that is designed to be easy for humans to read and write. - high-level language
To execute a program in a high-level language by translating it one line at a time. - interpret
A programming language that is designed to be easy for a computer to execute; also called machine language or assembly language. - low-level language
Any one of the language that people speak that evolved naturally - natural language
The output of the compiler after it translates the program. - object code
To examine a program and analyse the syntactic structure. - parse
A property of a program that can run on more than one kind of computer. - portability 
An instruction that causes the Python interpreter to display a value on the screen. - print statement
The process of formulating a problem, finding a solution, and expressing the solution. - problem solving
A sequence of instructions that specifies to a computer actions and computations to be performed. - program
An interactive user interface to the Python interpreter. - Python shell
An error that does not occur until the program has started to execute but that prevents the program from continuing.  - runtime error
A program stored in a file (usually one that will be interpreted.) - script
An error in a program that makes it do something other than what the programmer intended. - semantic error
The meaning of a program. - semantics
A program in a high-level language before being compiled. - source code
The structure of a program. syntax
An error in a program that makes it impossible to parse - and therefore impossible to interpret.  syntax error
One of the basic elements of the syntactic structure of a program, analogous to a word in a natural language. - token. 
Which of the following is NOT one of the computer languages developed in the 1950’s - BASIC (Beginners All Purpose Symbolic Instruction Code)
The BASIC language was developed by John G. Kemeny at which school: - Dartmouth College 
A popular computer language developed by Dennis Ritchie and Ken Thompson at Bell Labs in the 70's is: - C
The concept of a computer ‘bug’ was first attributed to ______ who found a moth stuck in a relay that caused a failure in a computer at Harvard University. The term ‘debugging’ has since come to mean correcting errors in a computer or computer program. - Grace Murray Hopper
Fortran language was designed to process business transactions - False
The COBOL language was designed to solve business problems and was adapted to processing business transactions - True
The C language was developed at Bell Labs with the objective of being the first object oriented language - False
Perl, Python, and PHP are all compiled languages - False
A program is a sequence of instructions that specifies how to perform a computation - True
The three kinds or errors that can occur in a program are_______________ - syntax, runtime and semantic
Portability means the program is written in small chunks of code. - False
During the 1990's, a major influence on programming languages was____________________ - the Internet
Python is considered to be _______________ - an internet language
Which of the following is Not a programming language. - Kuntz
A statement that assigns a value to a name (variable). - assignment statement
Information in a program that is meant for other programmers (or anyone reading the source code) and has no effect on the execution of the program. - comment 
The ability to combine simple expressions and statements into compound statements and expressions in order to represent complex computations concisely. - composition
To join two strings end-to-end. - concatenate
A set of values. - data type
To simplify an expression by performing the operations in order to yield a single value. - evaluate
A combination of variables, operators, and values that represents a single result value. - expression
A Python data type which stores floating-point numbers. - float
A Python data type that holds positive and negative whole numbers. - int
An operation that divides one integer by another and yields an integer. - integer division
A reserved word that is used by the compiler to parse programs. - keyword
One of the values on which an operator operates. - operand
A special symbol that represents a simple computation like addition, multiplication, or string concatenation. - operator
The set of rules governing the order in which expressions involving multiple operators and operands are evaluated. - rules of precedence
An instruction that the Python interpreter can execute. - statement
A Python data type that holds a string of characters. - str
A number or string (or other things to be named later) that can be stored in a variable or computed in an expression. - value
A name that refers to a value - variable
A name given to a variable. - variable name
Programmers generally choose names for their variables that are meaningful and document what the variable is used for. - True
Variable names are not case sensitive. - False
Using keywords for variable names will result in a ________________ - syntax error
A script usually contains a sequence of statements. If there is more than one statement, the results appear one at a time as the statements execute. - True
An expression is a combination of values, variables, and operators. If you type an expression on the command line, the interpreter evaluates it and displays the result. - True
In a script, an expression all by itself is a legal statement, but it doesn't do anything. - True
The acronym PEMDAS is a useful way to remember the order of operations in Python. - True
As programs get bigger and more complicated, they get more difficult to read. This is why programmers should use Comments in their code. - True
  Which of the following is NOT one of the rules for pseudo code: - Capitalize every word
An advantage of Pseudo code is that it is a visual technique. - False
An advantage of Pseudo code is that it requires no special tools and can easily be written on a word processor. - True
Pseudo code is a newer tool and has features that make it more reflective of the structured concepts. - True
Every flowchart must have a START and STOP symbol. - True
The use of arrows in flowcharts is optional because the flow direction is obvious. - False
A flowchart with more than 15 symbols is considered poor form. - True
Pseudo code should contain the exact same statements as the programming language that will be used. - False
One of the advantages of flowcharts is that it is hard to modify. - False
One of the advantages of pseudo code is that it implements structured concepts well. - True
The C language was developed at Bell Labs with the objective of being the first object oriented language - False
Programmers generally choose names for their variables that are meaningful and document what the variable is used for. - True
Pseudo code is a newer tool and has features that make it more reflective of the structured concepts. - True
A statement that assigns a value to a name (variable). → assignment statement
Information in a program that is meant for other programmers (or anyone reading the source code) and has no effect on the execution of the program. → comment
The ability to combine simple expressions and statements into compound statements and expressions in order to represent complex computations concisely. → composition, 
To join two strings end-to-end. → concatenate, 
A set of values. → data type, 
To simplify an expression by performing the operations in order to yield a single value. → evaluate, 
A combination of variables, operators, and values that represents a single result value. → expression, 
A Python data type which stores floating-point numbers. → float, 
A Python data type that holds positive and negative whole numbers. → int, 
An operation that divides one integer by another and yields an integer. → integer division, 
A reserved word that is used by the compiler to parse programs. → keyword
One of the values on which an operator operates. → operand, 
A special symbol that represents a simple computation like addition, multiplication, or string concatenation. → operator, 
The set of rules governing the order in which expressions involving multiple operators and operands are evaluated. → rules of precedence, 
An instruction that the Python interpreter can execute. → statement, 
A Python data type that holds a string of characters. → str, 
A number or string (or other things to be named later) that can be stored in a variable or computed in an expression. → value, 
A name that refers to a value. → variable, A name given to a variable. → variable name
The use of arrows in flowcharts is optional because the flow direction is obvious. - False
Variable names are not case sensitive. - False
The COBOL language was designed to solve business problems and was adapted to processing business transactions - True
One of the advantages of a function is that it allows the programmer to alter the flow of execution in the program. - False 
A stack diagram shows the value of each variable and the function to which each variable belongs. - True
True or False: The graphical representation of a stack of functions, their variables, and the values to which they refer is called a traceback? - False
True or False: A local variable is a variable defined inside a function that can only be used inside its function. - True
The order in which statements are executed during a program run. - Flow of execution
The first part of a compound statement, begins with a keyword and ends with a colon ( : ) - header
A statement that executes a function. It consists of the name of the function followed by a list of arguments enclosed in parentheses. - function call
A variable defined inside a function that can only be used inside its function. - local variable
A graphical representation of functions, their variables, and the values to which they refer. - stack diagram
------ What will the output of this program be when it is executed? def test_function( length, width, height):    print ("the area of the box is ", length*width*height)    return length*width*height l = 12.5 w = 5 h = 2 test_function(l, w, h) print ("The area of the box is ", length*width*height) 
A NameError because a variable not defined
What will the output of the following code be? def recursive( depth ):    depth+=1    while (depth < 5):        ret = recursive(depth)    return depth ret = recursive( 0 ) print ("the recursive depth is ", ret)
None
What does the import statement in the following script do?
import StringIO
output = StringIO.StringIO() output.write('First line.\n') output.close()
It includes a Python module called StringIO into the script
The following Python script will generate an error when executed.  What is the cause of the error? def function2(param):    print (param, param)    print (cat) def function1(part1, part2):    cat = part1 + part2    function2(cat) chant1 = "See You " chant2 = "See Me " function1(chant1, chant2)
The variable cat is local to function1 and cannot be used in function2
Dot notation is reserved for variable names and cannot be used to call a function. - False
Functions always get executed first regardless to the flow of execution. - False
The 80286 microprocessor was introduced in February 1982 and was four times more powerful than the 8088. - True
What does function subroutine do? def subroutine( n ):  while n > 0:      print (n,)      n -= 1
Counts from n down to 1 and displays each number
The following code is an example of what principle? bruce = 5 print (bruce,) bruce = 7 print (bruce)
Multiple Assignment
True/False: The % or modulus operator returns the remainder present when two integers do not divide evenly into one another. - True
True/False: An algorithm is a step by step process for solving a problem. - True
Functions allow the programmer to encapsulate and generalize sections of code. - True
One way to generalize a function is to replace a variable with a value. - False
A variable name defined in a function cannot appear in the calling program because it will cause a conflict error. - False
A function that returns an integer value grater than 0 is called a boolean function. -  False
Encapsulation is the process of wrapping a piece of code in a function - True
Repeated execution of a set of programming statements is called repetitive execution. - False 
A development approach that that is intended to avoid a lot of debugging by only adding and testing small amounts of code at a time is called. -  incremental development
The statements inside of a loop are known as the ____ of the loop. - body
A loop where the terminating condition is never achieved is called an _______ - infinite loop
Functions can only return Boolean expressions. - False
With built in functions, it is generally acceptable to take a "Leap of Faith". - True
"Dead code" is code that performs calculations but never displays the results. - False
Boolean expressions control _________________ - recursion, conditional execution, alternative execution
The modulus operator is the same as the divide operator. - False
Chained conditionals are used when there are three or more possibilities. - True
A stack diagram shows the value of each variable and the function to which each variable belongs. - True
True or False: The graphical representation of a stack of functions, their variables, and the values to which they refer is called a traceback? - False
What will the output of the following code be? def recursive( depth ):    depth+=1    while (depth < 5):        ret = recursive(depth)    return depth ret = recursive( 0 ) print ("the recursive depth is ", ret)
None
Functions can only return Boolean expressions. - False
A data type in which the values are made up of components, or elements, that are themselves values is known as an object data type. - False
Given any real numbers a and b, exactly one of the following relations holds: a < b, a > b, or a = b. Thus when you can establish that two of the relations are false, you can assume the remaining one is true. This principle is known as: - Trichotomy
A parameter written in a function header with an assignment to a default value which it will receive if no corresponding argument is given for it in the function call is called an optional parameter. - True
To create a new object that has the same value as an existing object is know as creating an alias - False
The following code: for fruit in ["banana", "apple", "quince"]:    print (fruit)     will produce the following output: banana apple quince
False
A variable that has a data type of "str" cannot be a compound data type. - False
Traversal can only be accomplished with the "while" loop. - False
Strings are easily changed with string slices. - False
The elements of a list are immutable. - False
The set of modules that are included in the default installation of python are known as the: -  Standard Library
Variables that are defined inside of a module are called what? - Attributes
Creating a python script file with a .py extension on the filename and placing it in the appropriate directory is all that is required to create a module? - True
In the following Python statement, what do we call the portion of the statement before the dot ('string.')? string.capitalize('maryland') - Module
In the following segment of code what do we call the portion of the statement that follows the dot (capitalize)? string.capitalize('maryland') - Method
What will the contents of mylist be after the following code has been executed? >>> mylist = [1, 4, 2, 3] >>> mylist.append(5) 
[1,4,2,3,5]
What will the following code segment do? infile.readlines() - Read all remaining lines in a file
Memory that can maintain its state without power is know as. - Non volatile memory
Which of the following is NOT a valid mode that can be used to open a file when using the 'open' statement? - x (eXecute)
The dot operator (.) permits access to attributes and functions of a module (or attributes and methods of a class or instance). - True
Pickling is a way to _________________ - preserve data structure
Exceptions allow the programmer to _________________ - write code to handle runtime errors
The Motorola Power PC 601 microprocessor contained 2.8 million transistors. True
The first patent for a microprocessor is attributed to Gary Boone and MIchael Cochran of Texas Instruments. - True.
0 notes
gutcode-blog · 8 years ago
Text
PYTHON LEARNING
Using the IDLE development environment, create a Python script named tryme3.py . Write a function in this file called nine_lines that uses a function called three_lines to print nine blank lines. Now add a function named clear_screen that prints out twenty-five blank lines. The last line of your program should call the function to clear_screen .
The  function three_lines and new_line are defined below so that you can see a nested function call.
def new_line():   print()
def three_lines():   new_line()   new_line()   new_line()
Submit your Python script file in the posting of your assignment. Your Python script should be either a .txt file or a .py file. You must execute your script and copy and paste the output produced into a document that you will submit along with your python script. It is very helpful if you print a placeholder between the printing of 9 lines and the printing of 25 lines. It will make your output easier to read for the assessor. A placeholder can be a comment such as “now printing 9 lines” or “now printing 25 lines”.
ANSWER: def new_line():    print()
def three_lines():        new_line()        new_line()        new_line()
def nine_lines():    three_lines()    three_lines()    three_lines()
print("First Line.") print("now running nine blank lines...") nine_lines() print("Second Line.")
def clear_section():    nine_lines()    nine_lines()    three_lines()    three_lines()    new_line()
print("Line 1") print("now printing 25 black lines...") clear_section() print("Line 26")
PLEASE CONTRIBUTE BY SHARING AMONG FRIENDS.
0 notes
gutcode-blog · 8 years ago
Text
DATA SCIENCE
Data Science: R Basics from Harvard University
Causal Diagrams: Draw Your Assumptions Before Your Conclusionsfrom Harvard University
Principles, Statistical and Computational Tools for Reproducible Science from Harvard University
Data Science Ethics from University of Michigan
Statistical Modeling and Regression Analysis from Georgia Institute of Technology
Big Data Analytics in Healthcare from Georgia Institute of Technology
Data Analytics Foundations for Accountancy I from University of Illinois at Urbana-Champaign
Introduction to Genomic Data Science from University of California, San Diego
Python Data Visualization from Rice University
Python Data Analysis from Rice University
Understanding Your Data: Analytical Tools from University of Virginia
How to Win a Data Science Competition: Learn from Top Kagglers from Higher School of Economics
Big Data and the Environment from University of Reading
Predictive Modeling in Learning Analytics from University of Texas Arlington
Knowledge Inference and Structure Discovery for Education from University of Texas Arlington
Multimodal Learning Analytics from University of Texas Arlington
Social Network Analysis (SNA) from University of Texas Arlington
Connecting Learning Data to Improve Instructional Design from University of Texas Arlington
Feature Engineering for Improving Learning Environments from University of Texas Arlington
Cluster Analysis from University of Texas Arlington
Learning Analytics Fundamentals from University of Texas Arlington
Whole genome sequencing of bacterial genomes – tools and applications from Technical University of Denmark (DTU)
Understanding Data from George Mason University
Análisis de Datos Experimentales: Utilidades Básicas. from Universidad Politécnica de Madrid
Advanced Data Mining with Weka from University of Waikato
Введение в данные from Novosibirsk State University
Тренды и классификации from Novosibirsk State University
pt010: 高校生のためのデータサイエンス入門 from Shiga University
0 notes
gutcode-blog · 8 years ago
Text
COMPUTER SCIENCE for free
Neural Networks and Deep Learning from deeplearning.ai (taught by Stanford prof. Andrew Ng)
Algorithms: Design and Analysis from Stanford University (old Coursera course, but hosted without any paywalls directly by Stanford)
Algorithms: Design and Analysis, Part 2 from Stanford University
The Unix Workbench from Johns Hopkins University
Hacking and Patching from University of Colorado System
Machine Learning from Georgia Institute of Technology
Linux Server Management and Security from University of Colorado System
Improving Deep Neural Networks: Hyperparameter tuning, Regularization and Optimization from deeplearning.ai
Structuring Machine Learning Projects from deeplearning.ai
Sequence Models from deeplearning.ai
Convolutional Neural Networks from deeplearning.ai
Accessible Gamification for Business from Georgia Institute of Technology
Accounting Analysis II: Measurement and Disclosure of Liabilities from University of Illinois at Urbana-Champaign
Bayesian Methods for Machine Learning from Higher School of Economics
Natural Language Processing from Higher School of Economics
Introduction to Deep Learning from Higher School of Economics
Deep Learning in Computer Vision from Higher School of Economics
Addressing Large Hadron Collider Challenges by Machine Learningfrom Higher School of Economics
Introduction to Reinforcement Learning from Higher School of Economics
Introduction to TCP/IP from Yonsei University
Deep Learning for Business from Yonsei University
TV Whitespaces for Museums and Archives from San Jose State University
Capstone: Autonomous Runway Detection for IoT from EIT Digital
Homeland Security & Cybersecurity Connection – It’s Not About the Terrorists from University of Colorado System
Packet Switching Networks and Algorithms from University of Colorado System
Proactive Computer Security from University of Colorado System
Introduction to Cybersecurity for Business from University of Colorado System
Cyber Threats and Attack Vectors from University of Colorado System
Detecting and Mitigating Cyber Threats and Attacks from University of Colorado System
Cybersecurity Policy for Aviation and Internet Infrastructures from University of Colorado System
Enterprise System Management and Security from University of Colorado System
TCP/IP and Advanced Topics from University of Colorado System
Peer-to-Peer Protocols and Local Area Networks from University of Colorado System
Windows Server Management and Security from University of Colorado System
Planning, Auditing and Maintaining Enterprise Systems from University of Colorado System
Homeland Security and Cybersecurity Future from University of Colorado System
Cybersecurity Policy for Water and Electricity Infrastructures from University of Colorado System
Fundamentals of Network Communication from University of Colorado System
Design and Analyze Secure Networked Systems from University of Colorado System
Secure Networked System with Firewall and IDS from University of Colorado System
Symmetric Cryptography from University of Colorado System
Cryptography and Information Theory from University of Colorado System
Cryptographic Hash and Integrity Protection from University of Colorado System
Asymmetric Cryptography and Key Management from University of Colorado System
Basic Cryptography and Programming with Crypto API from University of Colorado System
Classical Cryptosystems and Core Concepts from University of Colorado System
Архитектура ЭВМ (Computer Architecture) from Saint Petersburg State University
Sparse Representations in Signal and Image Processing: Fundamentalsfrom Technion – Israel Institute of Technology
Sparse Representations in Image Processing: From Theory to Practicefrom Technion – Israel Institute of Technology
Cutting Edge Deep Learning For Coders, Part 2 from fast.ai
Architettura degli elaboratori from University of Urbino
Liberating Programming: System Development for Everyone from Weizmann Institute of Science
Банковское дело и финансы from Sberbank Corporate University
Digital Accessibility as a Business Practice from Ryerson University
PROGRAMMING
Advanced MATLAB for Scientific Computing from Stanford University
Building Web Applications in PHP from University of Michigan
Building Database Applications in PHP from University of Michigan
JavaScript, jQuery, and JSON from University of Michigan
Introduction to Structured Query Language (SQL) from University of Michigan
Server-side Development with NodeJS, Express and MongoDB from The Hong Kong University of Science and Technology
Database Systems Concepts and Design from Georgia Institute of Technology
Programming Fundamentals from Duke University
Python Programming Essentials from Rice University
Python Data Representations from Rice University
Parallel Programming in Java from Rice University
Distributed Programming in Java from Rice University
Concurrent Programming in Java from Rice University
3D Models for Virtual Reality from University of London International Programmes
Building Interactive 3D Characters and Social VR from University of London International Programmes
Introduction to Virtual Reality from University of London International Programmes
Making Your First Virtual Reality Game from University of London International Programmes
3D Interaction Design in Virtual Reality from University of London International Programmes
Software Development Processes and Methodologies from University of Minnesota
Agile Software Development from University of Minnesota ★★★★☆(1)
Lean Software Development from University of Minnesota
Engineering Practices for Building Quality Software from University of Minnesota
Globally Distributed Software Engineering from Delft University of Technology
Программирование на Python from Moscow Institute of Physics and Technology
Тонкости верстки from Moscow Institute of Physics and Technology
Основы HTML и CSS from Moscow Institute of Physics and Technology
JavaScript, часть 1: основы и функции from Moscow Institute of Physics and Technology
Основы дизайна мобильных приложений from Moscow Institute of Physics and Technology
Introducción a la programación orientada a objetos en Java from Universidad de los Andes
Design Patterns from University of Alberta
Object-Oriented Design from University of Alberta
Service-Oriented Architecture from University of Alberta
Software Architecture from University of Alberta
Software Design as an Element of the Software Development Lifecyclefrom University of Colorado System
Software Design Methods and Tools from University of Colorado System
Software Design as an Abstraction from University of Colorado System
Software Design Threats and Mitigations from University of Colorado System
Video Game Design: Teamwork & Collaboration from Rochester Institute of Technology
Базы данных (Databases) from Saint Petersburg State University
Aprende a programar en C desde cero from Universitat Jaume I
Introducción a la programación en Python I: Aprendiendo a programar con Python from Pontificia Universidad Católica de Chile
Fare Apps in classe, ora! from University of Urbino
Creando Apps. Aprende a programar aplicaciones móviles from Universitas Telefónica
Introducción al diseño de videojuegos from Universitas Telefónica
Game Design and Development: Video Game Character Design from Abertay University
Hacking PostgreSQL: Data Access Methods from Ural Federal University
1 note · View note
gutcode-blog · 8 years ago
Text
HTML5 whole things
HTML5 Tutorial
HTML HOME
HTML Introduction
HTML Editors
HTML Basic
HTML Elements
HTML Attributes
HTML Headings
HTML Paragraphs
HTML Styles
HTML Formatting
HTML Quotations
HTML Comments
HTML Colors
HTML CSS
HTML Links
HTML Images
HTML Tables
HTML Lists
HTML Blocks
HTML Classes
HTML Iframes
HTML JavaScript
HTML File Paths
HTML Head
HTML Layout
HTML Responsive
HTML Computercode
HTML Entities
HTML Symbols
HTML Charset
HTML URL Encode
HTML XHTML
HTML Forms
HTML Forms
HTML Form Elements
HTML Input Types
HTML Input Attributes
HTML5
HTML5 Intro
HTML5 Support
HTML5 New Elements
HTML5 Semantics
HTML5 Migration
HTML5 Style Guide
HTML Graphics
HTML Canvas
HTML SVG
HTML Google Maps
HTML Media
HTML Media
HTML Video
HTML Audio
HTML Plug-ins
HTML YouTube
HTML APIs
HTML Geolocation
HTML Drag/Drop
HTML Web Storage
HTML Web Workers
HTML SSE
HTML Examples
HTML Examples
HTML Quiz
HTML Exercises
HTML Certificate
HTML Summary
HTML References
HTML Tag List
HTML Attributes
HTML Events
HTML Colors
HTML Canvas
HTML Audio/Video
HTML Doctypes
HTML Character Sets
HTML URL Encode
HTML Lang Codes
HTTP Messages
HTTP Methods
PX to EM Converter
Keyboard Shortcuts
0 notes
gutcode-blog · 8 years ago
Text
HTML5 head & body
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Hello World</title> </head> <body> (Thats the body of the content) </body> </html>
0 notes