Babu Madhav Institute of Information Technology, UTU 2015
|
|
- Hollie Bridges
- 5 years ago
- Views:
Transcription
1 Five years Integrated M.Sc.(IT)(Semester 5) Question Bank :Programming in Python Unit-1:Introduction To Python Q-1 Answer the following Questions in short. 1. Which operator is used for slicing? 2. What is lines and indentation. 3. What do you mean by mutable objects? 4. Define simple and compound statement. 5. What does \(back slash) character indicate? 6. What is slicing? 7. What is the use of pass statement 8. What is short-circuit operator? 9. Define with example mutating methods of list. 10. Which data types are available in Python? 11. Which components of lexical structure are used to write program in Python? 12. How to terminate multiline statement? 13. How print statement can be written? 14. What is the purpose of del statement? 15. How to specify multiline comment in Python? 16. Difference between * and ** operator. 17. Define various types of operator available in Python. 18. How identity and membership operator differ? 19. What is the difference between append() and extend() list methods. 20. How augmented assignment differ from plain assignment? Q-2 Answer the following Questions in detail. 1. Write a short note on Python programming language evolution 2. Explain various features of Python programming language in detail. 3. Explain lexical structure of Python programming language. 4. Write a short note on procedure oriented programming language. 5. Write a short note on object oriented programming language. 1
2 6. Write a short note on datatype of python 7. Explain various types of tokens available in python. 8. What is numeric operations, and explain it in detail. 9. Explain sequence operations with example. 10. Explain list with proper example. 11. Explain print statement with appropriate example. 12. Explain operators and expressions with example. 13. Write a note on python shell. 14. Explain string delimiters and string concatenation with example. 15. Explain expression evaluation process in python with example. 16. Explain quotation and comments in detail. 17. Explain assignment operator with suitable examples. 18. What is dictionary explain with example. 19. Explain operator s precedence in Python 20. Write a note on Python for being powerful programming language in your words. Q-3. Select most appropriate answer from the given option: 1. Each Python Program is made up of one or more. a. Logical lines b. Physical lines c. String literals d. (#) hash sign 2. Which of the following is not a keyword in Python? a. global b. lambda c. define d. with 3. What is the output of the code X=tuple( wow,) Print(X) a. runtime error b. ('w', 'o', 'w') c. ('w', 'o', 'w', ',') d. None of the above. 2
3 4. Which characters does not allowed to be a part of identifiers. &, $ b. % c. $ d. %, *, & 5. What is the output of below code x=dict.fromkeys('hel ',2) print(x) a. {' ': 2, 'e': 2, 'h': 2, 'l': 2} b. {'h': 2, 'e': 2, 'l': 2, ' ': 2} c. {' ': 2, 'l': 2, 'e': 2, 'h': 2} d. Runtime error 6. Which of the following is an augmented operator. a. <<== b. << c. >> d. == 7. The priority of is higher then. a. ^ (exclusive or), (regular or) b. %(modulo), &(Bitwise and) c. in,is d. **=,!= 8. divmod function is used to return. a. remainder of a given arguments b. integral division of given arguments c. floating-point division of given arguments d. pair containing quotient and remainder 9. Find the output of below code x=[1,2,3,4,5] del x[1,2] print(x) a. [1,4,5] b. [3,4,5] c. Runtime error d. [1,2,3,4,5] 10. output of the following code: 3
4 a=5 a<<=2 a. 20 b. 16 c. 32 d. 8 print(a) 11. What is the output of below code a=['d',1,23,45,3,23,"bye"] a.count(11) a. Error b. 1 c. 0 d. None 12. Which of the following is not comparison operator? a. < b. == c.!= d. None of the above. 13. What is output of below code: a=int( 101,2) print(a) a. 101 b. 2 c. Error d Output of the following code will be: X=[1,2,3,4] X[::-1] a. [1,2,3,4] b. -1 c. Error d. [4,3,2,1] 15. Output of following code will be: x=[1,2,3,4,5] del x[::2] print(x) a. [2,4] b. [3,5] 4
5 c. [1,2] d. None of the above 16. Which of the following type is mutable object? a. Strings b. Tuples c. Lists d. Sets 17. What will be the output of below code: x=5 x>>=2 print(x) a. 2 b. 10 c. 1 d Which function is used to print maximum allowable negative integer number in python. a. sys.maxint b. sys.maxint-1 c. sys.max d. sys.max Which of the following is not a mutating method of list. a. append(x) b. remove(x) c. reverse() d. count(x) 20. output of below code will be: a=10 b=20 a,b=b,a print(a,b) a b c d Q-4 Fill in the blanks. 1. Using and you can create data values of other types. 2. Strings in python are. 5
6 3. To indicate long type value is used. 4. Python statements are normally terminated by delimiter. 5. can be decimal, octal, or hexadecimal. 6. statement contains other statements and controls their execution. 7. A is an ordered container of items, indexed by non-negative integers. 8. A sequence of has special meaning of slicing. 9. Enter an empty line to terminate the statements. 10. A list contains items enclosed within. 11. An object that can be altered is known as. 12. A is known as user define object. 13. The accepts any object as its argument and returns the type object that represents the type of obj. 14. An literal is specified with a 0 followed by a sequence of digits from 0 to A python is used to identify the variable, function, class, module or other object. 16. Starting an identifier with indicates a private identifier. 17. allows multiple statements on the single line. 18. are the most versatile compound datatypes of Python. 19. Python s are hash table type. 20. evaluates to false if the variables on the either side of the operator point to the same object and true otherwise. Unit-2: Basic flow statements and classes Q-1 Answer the following Questions in short. 1. What are the purpose of break and continue statement? 2. Write syntax for if statement. 3. Explain raw_input() method in python. 4. What is the alternative for == and!= operator available in python? 5. What is function call? 6
7 6. What is the purpose of module? 7. How from keyword is helpful in module? 8. What is operator overloading? 9. What is the purpose of init () function? 10. What is difference between *argument and **argument in function? 11. What is difference between list and dictionary? 12. How to specify private member in class? 13. How to access super class method? 14. What is global variable? 15. What is garbage collection? 16. What is constructor? 17. How to include packages in python module? Q-2. Answer the following Questions in detail. 1. Write different ways to join two physical lines in python. 2. What is tokens, explain with various types of token? 3. Explain while and for control statement with example. 4. Write a note on if statement with example. 5. Explain for statement with example. 6. Write a note on function in python with example. 7. Explain lambda function with example. 8. What is namespace? Explain with example. 9. What is bound and unbound method? 10. Write a note on built in object type. 11. Explain class and its benefits in detail. 12. Write a note on class instance and its special method. 7
8 13. Explain inheritance with example. 14. Write a note on packages in python. 15. Explain module in python with example. 16. Explain method overriding in python. 17. Explain concept of data hiding in python. 18. Write a short note on recursive function with example. Q-3 Select most appropriate answer from the given options: 1. A is group of statement that executes upon request. a. Module b. Function c. Class d. Constructor 2. In a dictionary pair is combination of and. a. Variable, constant b. Key, value c. Attribute, value d. Key, data 3. When executes, the function terminates and the value of the expression is returned. a. Break b. Continue c. Return d. Pass 4. A def statement within a function body defines function. a. Child object b. Neasted function c. Inner class d. Child function 5. A expression is the anonymous equivalent of a normal function whose body is a single return statement. a. Function b. Lambda c. Regular d. None 6. statement is known as docstring of the class. a. init b. doc c. name d. class 8
9 7. When subclass defines method name same as parent class then it is said to be. a. Overloading b. Overriding c. Instantiation d. None 8. A is a method that you can call on a class. a. Final method b. Static method c. Private method d. Public method 9. Python calls method for the garbage collection. a. init b. del c. cmp d. call 10. is a built in method which returns total number of item in a collection. a. len b. count c. new d. getitem 11. To remove an item from the collection method is used. a. del b. del c. delitem d. remove 12. In python method is alternative for **(power) operation. a. pow b. ipow c. rpow d. pow() 13. function having single return statement. a. Static function b. Constructor c. Lambda function d. In line function 14. Loop gets terminated when statement executes. a. Continue b. Break c. Else d. Finally 9
10 Q-4 Fill in the blanks below 1. Special method of a class called as, which get call at the time of instantiation. 2. To stop execution of loop statement is used. 3. To define user define method keyword is used. 4. For compound statement symbol indicates starting of block. 5. A collection of class is known as. 6. Class can have constructor namely. 7. To display class name of an object is used. 8. In dictionary every combination of key and value is said to be. 9. A class is set of and. 10. To access data member keyword is used. 11. Statement is used to iterate list value. 12. To print information regarding class is used. 13. is said to be an instance of class. 14. method is used to create constructor. 15. For the concatenation of two string operator is used. 16. method displays documentation string of class. 17. **argument takes argument as the. Unit-3 Strings and Regular Expressions Q-1 Answer the following Questions in short. 1. Differentiate substitute() and safe_substitute(). 2. List out the method associated with regular expression 3. Differentiate find() and rfind() 4. What is the use of maktrans() functions? 5. Explain match() versus search() in python 6. How capitalize() and swapcase() work differently? 10
11 7. When will you use wrap() and fill() method? 8. What is the significance of optional flags? 9. What is explicit flag argument? 10. When we should use RE functionality? 11. How template class will be used? 12. Which method will return all the characters in upper case? 13. Differentiate title() and capitalize(). 14. What is the use of expandtabs() method? 15. Which functions are known as Boolean functions? 16. What is the purpose of join() function? 17. What is the difference between rindex() and rfind() methods? 18. What is string formatting? 19. List out integer string formatting idioms. 20. What is the purpose of ( ) pattern matching expression? Q-2 Answer the following Questions in detail. 1. Write short note on string objects. 2. Explain string module. 3. Explain template string in detail. 4. Explain text wrapping and filling in detail. 5. Explain regular expression object. 6. Write short note on pattern string syntax. 7. Explain Boolean functions associated with string objects. 8. Write short note on optional flag used in regular expression. 9. Explain match object in detail. 10. Write a note on set of characters pattern matching expression. 11
12 11. Explain the difference between match and search with appropriate example. 12. What is the purpose of groups() method? 13. Explain all non Boolean methods of string object. 14. Write about string formatting conversion characters. 15. Explain re module with example. 16. What is the importance of groupdict() method? 17. Write a note on alternatives with appropriate example. 18. What is format specifier? Explain functionality of all format specifier. 19. Explain set of characters and group comparatively with respect to regular expression. 20. Write short note on common regular expression idioms. Q-3 Select most appropriate answer from the given options Option which matches empty string but only at the start of the whole string is a. \A b. \B c. \M d. \E 2. Method related to groups a. Group() b. Groups() c. Groupdict() d. All of the above 3. Maketrans method returns a. Translation table b. Making transferring of table c. Translate the list d. Translation table of list 4. Method returns a copy of s with all uppercase letters converted to lowercase and vice versa is a. Swapcase() b. Capitalize() c. Translate() d. Initcap() 5. String is a type of 12
13 a. Sequence b. List c. Set d. Dictionary 6. (?#...) represents a. Content of parenthesis is comment. b.content of paranthesis is quickly executable c. Content of paranthesis is look ahead assertation. d. Content of paranthesis is look behind assertation. 7. String module supplies plain string attribute like a. Ascii_letters b. Ascii_swap c. Ascii_title d. Ascii_title 8. To match string irrespective of its case, flag is used. a. L b. M c. S d. I 9. To specify alternatives is used in regular expression. a. () b. {} c. d. [] 10. method returns replacement and the number of replacement. a. sub() b. subn() c. split() d. repl() 11. in match() function object returns the last indices of matched pattern. a. Span b. Start c. End d. Group 12. method returns a copy of string where escape sequence and back references are replaced. a. Span b. Start c. Expand d. End 13. To create sublists based on matched pattern method is used. a. sub() 13
14 b. split() c. subn() d. index() 14. To match the beginning of the string element is useful. a. $ b. ^ c. % d.! 15. (?P<id> ) element is used to indicate. a. Group b. Parent c. Id d. Process 16. To match any character including newline optional flag is used. a. I b. L c. M d. S 17. To match the end of the string element is useful. a. $ b. ^ c. % d.! 18. To match one digit element is useful. a. \a b. \d c. \D d. \W 19. To match any one of a set of characters element is used. a. ( ) b. * + c. (?...) d. *^ To match any whitespace characters element is useful. a. \s b. \S c. \t d. \T Q-4 Fill in the blanks. 1. To convert string in title case and methods are useful. 14
15 2. function returns the number of non-overlapping occurrences of substring. 3. To get the lowest index of substring method is useful. 4. Each tab character is changed into one or more spaces using method. 5. returns true when all characters are digits in string. 6. returns a dictionary containing all named groups of the match. 7. To define complemented character set element is used. 8. and element is used to match the end of string. 9. For the pattern matching module is require to import. 10. To convert upper case into lower case and vice-versa we can use method. 11. To remove both leading and trailing character from string method is useful. 12. Each format specifier is a substring of format that starts with sign. 13. To match a single character format specifier element is used. 14. is known as look behind assertion. 15. matches one digit like [0-9] set. 16. element is used to matches either preceding expression or following expression. 17. method returns true when all the characters in string are letters or digits. 18. To align string left with trailing space method is used. 19. To transform string in title case method is used. 20. To split string in multiple lines method is useful. 15
16 16
17 17
Department of Computer Science and Technology, UTU
060010502: Programming in Python Unit 1:Introduction to Python Que: 1 Answer the following question in short. 1. Which components of lexical structure are used write programme? 2. How to terminate the
More informationChapter 1 Summary. Chapter 2 Summary. end of a string, in which case the string can span multiple lines.
Chapter 1 Summary Comments are indicated by a hash sign # (also known as the pound or number sign). Text to the right of the hash sign is ignored. (But, hash loses its special meaning if it is part of
More informationContents. Figures. Tables. Examples. Foreword. Preface. 1 Basics of Java Programming 1. xix. xxi. xxiii. xxvii. xxix
PGJC4_JSE8_OCA.book Page ix Monday, June 20, 2016 2:31 PM Contents Figures Tables Examples Foreword Preface xix xxi xxiii xxvii xxix 1 Basics of Java Programming 1 1.1 Introduction 2 1.2 Classes 2 Declaring
More information\n is used in a string to indicate the newline character. An expression produces data. The simplest expression
Chapter 1 Summary Comments are indicated by a hash sign # (also known as the pound or number sign). Text to the right of the hash sign is ignored. (But, hash loses its special meaning if it is part of
More information[CHAPTER] 1 INTRODUCTION 1
FM_TOC C7817 47493 1/28/11 9:29 AM Page iii Table of Contents [CHAPTER] 1 INTRODUCTION 1 1.1 Two Fundamental Ideas of Computer Science: Algorithms and Information Processing...2 1.1.1 Algorithms...2 1.1.2
More informationChapter 3 : Informatics Practices. Class XI ( As per CBSE Board) Python Fundamentals. Visit : python.mykvs.in for regular updates
Chapter 3 : Informatics Practices Class XI ( As per CBSE Board) Python Fundamentals Introduction Python 3.0 was released in 2008. Although this version is supposed to be backward incompatibles, later on
More informationIntroduction to Python
Introduction to Python Version 1.1.5 (12/29/2008) [CG] Page 1 of 243 Introduction...6 About Python...7 The Python Interpreter...9 Exercises...11 Python Compilation...12 Python Scripts in Linux/Unix & Windows...14
More informationGlossary. For Introduction to Programming Using Python By Y. Daniel Liang
Chapter 1 Glossary For Introduction to Programming Using Python By Y. Daniel Liang.py Python script file extension name. assembler A software used to translate assemblylanguage programs into machine code.
More informationAdvanced Algorithms and Computational Models (module A)
Advanced Algorithms and Computational Models (module A) Giacomo Fiumara giacomo.fiumara@unime.it 2014-2015 1 / 34 Python's built-in classes A class is immutable if each object of that class has a xed value
More informationPYTHON CONTENT NOTE: Almost every task is explained with an example
PYTHON CONTENT NOTE: Almost every task is explained with an example Introduction: 1. What is a script and program? 2. Difference between scripting and programming languages? 3. What is Python? 4. Characteristics
More informationGE PROBLEM SOVING AND PYTHON PROGRAMMING. Question Bank UNIT 1 - ALGORITHMIC PROBLEM SOLVING
GE8151 - PROBLEM SOVING AND PYTHON PROGRAMMING Question Bank UNIT 1 - ALGORITHMIC PROBLEM SOLVING 1) Define Computer 2) Define algorithm 3) What are the two phases in algorithmic problem solving? 4) Why
More informationGIS 4653/5653: Spatial Programming and GIS. More Python: Statements, Types, Functions, Modules, Classes
GIS 4653/5653: Spatial Programming and GIS More Python: Statements, Types, Functions, Modules, Classes Statement Syntax The if-elif-else statement Indentation and and colons are important Parentheses and
More informationTable of Contents. Preface... xxi
Table of Contents Preface... xxi Chapter 1: Introduction to Python... 1 Python... 2 Features of Python... 3 Execution of a Python Program... 7 Viewing the Byte Code... 9 Flavors of Python... 10 Python
More informationThe SPL Programming Language Reference Manual
The SPL Programming Language Reference Manual Leonidas Fegaras University of Texas at Arlington Arlington, TX 76019 fegaras@cse.uta.edu February 27, 2018 1 Introduction The SPL language is a Small Programming
More informationThe PCAT Programming Language Reference Manual
The PCAT Programming Language Reference Manual Andrew Tolmach and Jingke Li Dept. of Computer Science Portland State University September 27, 1995 (revised October 15, 2002) 1 Introduction The PCAT language
More informationCS260 Intro to Java & Android 03.Java Language Basics
03.Java Language Basics http://www.tutorialspoint.com/java/index.htm CS260 - Intro to Java & Android 1 What is the distinction between fields and variables? Java has the following kinds of variables: Instance
More informationENGR 101 Engineering Design Workshop
ENGR 101 Engineering Design Workshop Lecture 2: Variables, Statements/Expressions, if-else Edgardo Molina City College of New York Literals, Variables, Data Types, Statements and Expressions Python as
More informationAnd Parallelism. Parallelism in Prolog. OR Parallelism
Parallelism in Prolog And Parallelism One reason that Prolog is of interest to computer scientists is that its search mechanism lends itself to parallel evaluation. In fact, it supports two different kinds
More informationPYTHON- AN INNOVATION
PYTHON- AN INNOVATION As per CBSE curriculum Class 11 Chapter- 2 By- Neha Tyagi PGT (CS) KV 5 Jaipur(II Shift) Jaipur Region Python Introduction In order to provide an input, process it and to receive
More informationComputer Hardware 6. The
The The Consultation, (1990-Present) Design Table of Contents [CHAPTER] 1 j NTRODUCTON 1 [CHAPTER] 2 1.1 Two Fundamental deas of Computer Science: Algorithms and nformation Processing 2 1,1.1 Algorithms
More informationWebgurukul Programming Language Course
Webgurukul Programming Language Course Take One step towards IT profession with us Python Syllabus Python Training Overview > What are the Python Course Pre-requisites > Objectives of the Course > Who
More informationVariable and Data Type I
The Islamic University of Gaza Faculty of Engineering Dept. of Computer Engineering Intro. To Computers (LNGG 1003) Lab 2 Variable and Data Type I Eng. Ibraheem Lubbad February 18, 2017 Variable is reserved
More informationIndex COPYRIGHTED MATERIAL
Index COPYRIGHTED MATERIAL Note to the Reader: Throughout this index boldfaced page numbers indicate primary discussions of a topic. Italicized page numbers indicate illustrations. A abstract classes
More informationIntroduction to Programming Using Java (98-388)
Introduction to Programming Using Java (98-388) Understand Java fundamentals Describe the use of main in a Java application Signature of main, why it is static; how to consume an instance of your own class;
More informationPython Tutorial. Day 1
Python Tutorial Day 1 1 Why Python high level language interpreted and interactive real data structures (structures, objects) object oriented all the way down rich library support 2 The First Program #!/usr/bin/env
More informationPython in 10 (50) minutes
Python in 10 (50) minutes https://www.stavros.io/tutorials/python/ Python for Microcontrollers Getting started with MicroPython Donald Norris, McGrawHill (2017) Python is strongly typed (i.e. types are
More informationStrings. Upsorn Praphamontripong. Note: for reference when we practice loop. We ll discuss Strings in detail after Spring break
Note: for reference when we practice loop. We ll discuss Strings in detail after Spring break Strings Upsorn Praphamontripong CS 1111 Introduction to Programming Spring 2018 Strings Sequence of characters
More informationPython I. Some material adapted from Upenn cmpe391 slides and other sources
Python I Some material adapted from Upenn cmpe391 slides and other sources Overview Names & Assignment Data types Sequences types: Lists, Tuples, and Strings Mutability Understanding Reference Semantics
More information1. What type of error produces incorrect results but does not prevent the program from running? a. syntax b. logic c. grammatical d.
Gaddis: Starting Out with Python, 2e - Test Bank Chapter Two MULTIPLE CHOICE 1. What type of error produces incorrect results but does not prevent the program from running? a. syntax b. logic c. grammatical
More informationTypescript on LLVM Language Reference Manual
Typescript on LLVM Language Reference Manual Ratheet Pandya UNI: rp2707 COMS 4115 H01 (CVN) 1. Introduction 2. Lexical Conventions 2.1 Tokens 2.2 Comments 2.3 Identifiers 2.4 Reserved Keywords 2.5 String
More informationThere are four numeric types: 1. Integers, represented as a 32 bit (or longer) quantity. Digits sequences (possibly) signed are integer literals:
Numeric Types There are four numeric types: 1. Integers, represented as a 32 bit (or longer) quantity. Digits sequences (possibly) signed are integer literals: 1-123 +456 2. Long integers, of unlimited
More informationLanguage Basics. /* The NUMBER GAME - User tries to guess a number between 1 and 10 */ /* Generate a random number between 1 and 10 */
Overview Language Basics This chapter describes the basic elements of Rexx. It discusses the simple components that make up the language. These include script structure, elements of the language, operators,
More informationAbsolute C++ Walter Savitch
Absolute C++ sixth edition Walter Savitch Global edition This page intentionally left blank Absolute C++, Global Edition Cover Title Page Copyright Page Preface Acknowledgments Brief Contents Contents
More informationPython Training. Complete Practical & Real-time Trainings. A Unit of SequelGate Innovative Technologies Pvt. Ltd.
Python Training Complete Practical & Real-time Trainings A Unit of. ISO Certified Training Institute Microsoft Certified Partner Training Highlights : Complete Practical and Real-time Scenarios Session
More informationScheme Quick Reference
Scheme Quick Reference COSC 18 Fall 2003 This document is a quick reference guide to common features of the Scheme language. It is not intended to be a complete language reference, but it gives terse summaries
More informationScript language: Python Data structures
Script language: Python Data structures Cédric Saule Technische Fakultät Universität Bielefeld 3. Februar 2015 Immutable vs. Mutable Previously known types: int and string. Both are Immutable but what
More informationDaMPL. Language Reference Manual. Henrique Grando
DaMPL Language Reference Manual Bernardo Abreu Felipe Rocha Henrique Grando Hugo Sousa bd2440 flt2107 hp2409 ha2398 Contents 1. Getting Started... 4 2. Syntax Notations... 4 3. Lexical Conventions... 4
More informationL-System Fractal Generator: Language Reference Manual
L-System Fractal Generator: Language Reference Manual Michael Eng, Jervis Muindi, Timothy Sun Contents 1 Program Definition 3 2 Lexical Conventions 3 2.1 Comments...............................................
More informationCryptol version 2 Syntax
Cryptol version 2 Syntax Contents Layout 2 Comments 2 Identifiers 2 Keywords and Built-in Operators 3 Numeric Literals 3 Bits 4 If Then Else with Multiway 4 Tuples and Records 5 Sequences 6 Functions 7
More informationPart IV. More on Python. Tobias Neckel: Scripting with Bash and Python Compact Max-Planck, February 16-26,
Part IV More on Python Compact Course @ Max-Planck, February 16-26, 2015 36 More on Strings Special string methods (excerpt) s = " Frodo and Sam and Bilbo " s. islower () s. isupper () s. startswith ("
More informationIC Language Specification
CS 301 Spring 2016 IC Language Specification The IC Language For the implementation project, you will build a compiler for an object-oriented language called IC (for Irish Coffee 1 ), which is essentially
More informationAdvanced Python. Executive Summary, Session 1
Advanced Python Executive Summary, Session 1 OBJECT: a unit of data of a particular type with characteristic functionality (i.e., methods and/or use with operators). Everything in Python is an object.
More informationCoral Programming Language Reference Manual
Coral Programming Language Reference Manual Rebecca Cawkwell, Sanford Miller, Jacob Austin, Matthew Bowers rgc2137@barnard.edu, {ja3067, skm2159, mlb2251}@columbia.edu October 15, 2018 Contents 1 Overview
More informationInteractive use. $ python. >>> print 'Hello, world!' Hello, world! >>> 3 $ Ctrl-D
1/58 Interactive use $ python Python 2.7.5 (default, Mar 9 2014, 22:15:05) [GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)] on darwin Type "help", "copyright", "credits" or "license" for more information.
More informationInteractive use. $ python. >>> print 'Hello, world!' Hello, world! >>> 3 $ Ctrl-D
1/60 Interactive use $ python Python 2.7.5 (default, Mar 9 2014, 22:15:05) [GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)] on darwin Type "help", "copyright", "credits" or "license" for more information.
More informationPython memento TI-Smart Grids
Python memento TI-Smart Grids Genoveva Vargas-Solar French Council of Scientific Research, LIG genoveva.vargas@imag.fr http://vargas-solar.com/data-centric-smart-everything/ * This presentation was created
More informationCSc 10200! Introduction to Computing. Lecture 2-3 Edgardo Molina Fall 2013 City College of New York
CSc 10200! Introduction to Computing Lecture 2-3 Edgardo Molina Fall 2013 City College of New York 1 C++ for Engineers and Scientists Third Edition Chapter 2 Problem Solving Using C++ 2 Objectives In this
More informationString Processing CS 1111 Introduction to Programming Fall 2018
String Processing CS 1111 Introduction to Programming Fall 2018 [The Coder s Apprentice, 10] 1 Collections Ordered, Dup allow List Range String Tuple Unordered, No Dup Dict collection[index] Access an
More informationWeiss Chapter 1 terminology (parenthesized numbers are page numbers)
Weiss Chapter 1 terminology (parenthesized numbers are page numbers) assignment operators In Java, used to alter the value of a variable. These operators include =, +=, -=, *=, and /=. (9) autoincrement
More informationSprite an animation manipulation language Language Reference Manual
Sprite an animation manipulation language Language Reference Manual Team Leader Dave Smith Team Members Dan Benamy John Morales Monica Ranadive Table of Contents A. Introduction...3 B. Lexical Conventions...3
More informationPrinceton University COS 333: Advanced Programming Techniques A Subset of Python 2.7
Princeton University COS 333: Advanced Programming Techniques A Subset of Python 2.7 Program Structure # Print "hello world" to stdout. print 'hello, world' # Print "hello world" to stdout. def f(): print
More informationIT 374 C# and Applications/ IT695 C# Data Structures
IT 374 C# and Applications/ IT695 C# Data Structures Module 2.1: Introduction to C# App Programming Xianrong (Shawn) Zheng Spring 2017 1 Outline Introduction Creating a Simple App String Interpolation
More informationLCSL Reference Manual
LCSL Reference Manual Sachin Nene, Chaue Shen, Bogdan Caprita, Julian Maller 1.1 Lexical Conventions 1.1.1 Comments Comments begin with (* and end with *) 1.1.2 Variables Variables consist solely of alphanumeric
More informationIntroduction to Bioinformatics
Introduction to Bioinformatics Variables, Data Types, Data Structures, Control Structures Janyl Jumadinova February 3, 2016 Data Type Data types are the basic unit of information storage. Instances of
More informationDuration: Six Weeks Faculty : Mr Sai Kumar, Having 10+ Yrs Experience in IT
Duration: Six Weeks Faculty : Mr Sai Kumar, Having 10+ Yrs Experience in IT Online Classes are also available Recorded class will be given if you miss any day interview tips and quiz at end of every module
More informationPreface... (vii) CHAPTER 1 INTRODUCTION TO COMPUTERS
Contents Preface... (vii) CHAPTER 1 INTRODUCTION TO COMPUTERS 1.1. INTRODUCTION TO COMPUTERS... 1 1.2. HISTORY OF C & C++... 3 1.3. DESIGN, DEVELOPMENT AND EXECUTION OF A PROGRAM... 3 1.4 TESTING OF PROGRAMS...
More informationObject oriented programming. Instructor: Masoud Asghari Web page: Ch: 3
Object oriented programming Instructor: Masoud Asghari Web page: http://www.masses.ir/lectures/oops2017sut Ch: 3 1 In this slide We follow: https://docs.oracle.com/javase/tutorial/index.html Trail: Learning
More informationFull file at
Java Programming: From Problem Analysis to Program Design, 3 rd Edition 2-1 Chapter 2 Basic Elements of Java At a Glance Instructor s Manual Table of Contents Overview Objectives s Quick Quizzes Class
More informationCOLLEGE OF ENGINEERING, NASHIK-4
Pune Vidyarthi Griha s COLLEGE OF ENGINEERING, NASHIK-4 DEPARTMENT OF COMPUTER ENGINEERING Important PYTHON Questions 1. What is Python? Python is a high-level, interpreted, interactive and object-oriented
More informationText. Text Actions. String Contains
Text The Text Actions are intended to refine the texts acquired during other actions, for example, from web-elements, remove unnecessary blank spaces, check, if the text matches the defined content; and
More informationIndex. object lifetimes, and ownership, use after change by an alias errors, use after drop errors, BTreeMap, 309
A Arithmetic operation floating-point arithmetic, 11 12 integer numbers, 9 11 Arrays, 97 copying, 59 60 creation, 48 elements, 48 empty arrays and vectors, 57 58 executable program, 49 expressions, 48
More informationProgramming in Python 3
Programming in Python 3 Programming transforms your computer from a home appliance to a power tool Al Sweigart, The invent with Python Blog Programming Introduction Write programs that solve a problem
More information06/11/2014. Subjects. CS Applied Robotics Lab Gerardo Carmona :: makeroboticsprojects.com June / ) Beginning with Python
CS95003 - Applied Robotics Lab Gerardo Carmona :: makeroboticsprojects.com June / 2014 Subjects 1) Beginning with Python 2) Variables 3) Strings 4) Basic arithmetic operators 5) Flow control 6) Comparison
More informationIntroduction to Computer Programming CSCI-UA 2. Review Midterm Exam 1
Review Midterm Exam 1 Review Midterm Exam 1 Exam on Monday, October 7 Data Types and Variables = Data Types and Variables Basic Data Types Integers Floating Point Numbers Strings Data Types and Variables
More informationHere n is a variable name. The value of that variable is 176.
UNIT II DATA, EXPRESSIONS, STATEMENTS 9 Python interpreter and interactive mode; values and types: int, float, boolean, string, and list; variables, expressions, statements, tuple assignment, precedence
More informationGetting Started. Office Hours. CSE 231, Rich Enbody. After class By appointment send an . Michigan State University CSE 231, Fall 2013
CSE 231, Rich Enbody Office Hours After class By appointment send an email 2 1 Project 1 Python arithmetic Do with pencil, paper and calculator first Idle Handin Help room 3 What is a Computer Program?
More informationData Structures (list, dictionary, tuples, sets, strings)
Data Structures (list, dictionary, tuples, sets, strings) Lists are enclosed in brackets: l = [1, 2, "a"] (access by index, is mutable sequence) Tuples are enclosed in parentheses: t = (1, 2, "a") (access
More informationARG! Language Reference Manual
ARG! Language Reference Manual Ryan Eagan, Mike Goldin, River Keefer, Shivangi Saxena 1. Introduction ARG is a language to be used to make programming a less frustrating experience. It is similar to C
More informationStrings are actually 'objects' Strings
Strings are actually 'objects' Strings What is an object?! An object is a concept that we can encapsulate data along with the functions that might need to access or manipulate that data. What is an object?!
More informationLanguage Reference Manual simplicity
Language Reference Manual simplicity Course: COMS S4115 Professor: Dr. Stephen Edwards TA: Graham Gobieski Date: July 20, 2016 Group members Rui Gu rg2970 Adam Hadar anh2130 Zachary Moffitt znm2104 Suzanna
More informationChapter 2: Using Data
Chapter 2: Using Data TRUE/FALSE 1. A variable can hold more than one value at a time. F PTS: 1 REF: 52 2. The legal integer values are -2 31 through 2 31-1. These are the highest and lowest values that
More informationIntroduction to Python for Plone developers
Plone Conference, October 15, 2003 Introduction to Python for Plone developers Jim Roepcke Tyrell Software Corporation What we will learn Python language basics Where you can use Python in Plone Examples
More informationJava+- Language Reference Manual
Fall 2016 COMS4115 Programming Languages & Translators Java+- Language Reference Manual Authors Ashley Daguanno (ad3079) - Manager Anna Wen (aw2802) - Tester Tin Nilar Hlaing (th2520) - Systems Architect
More informationIntroduction to Python
Introduction to Python خانه ریاضیات اصفهان فرزانه کاظمی زمستان 93 1 Why Python? Python is free. Python easy to lean and use. Reduce time and length of coding. Huge standard library Simple (Python code
More informationVariable and Data Type I
Islamic University Of Gaza Faculty of Engineering Computer Engineering Department Lab 2 Variable and Data Type I Eng. Ibraheem Lubbad September 24, 2016 Variable is reserved a location in memory to store
More informationOverview of C. Basic Data Types Constants Variables Identifiers Keywords Basic I/O
Overview of C Basic Data Types Constants Variables Identifiers Keywords Basic I/O NOTE: There are six classes of tokens: identifiers, keywords, constants, string literals, operators, and other separators.
More informationPYTHON FOR MEDICAL PHYSICISTS. Radiation Oncology Medical Physics Cancer Care Services, Royal Brisbane & Women s Hospital
PYTHON FOR MEDICAL PHYSICISTS Radiation Oncology Medical Physics Cancer Care Services, Royal Brisbane & Women s Hospital TUTORIAL 1: INTRODUCTION Thursday 1 st October, 2015 AGENDA 1. Reference list 2.
More informationKey Differences Between Python and Java
Python Python supports many (but not all) aspects of object-oriented programming; but it is possible to write a Python program without making any use of OO concepts. Python is designed to be used interpretively.
More informationLecture 27. Lecture 27: Regular Expressions and Python Identifiers
Lecture 27 Lecture 27: Regular Expressions and Python Identifiers Python Syntax Python syntax makes very few restrictions on the ways that we can name our variables, functions, and classes. Variables names
More informationChapter 2 Getting Started with Python
Chapter 2 Getting Started with Python Introduction Python Programming language was developed by Guido Van Rossum in February 1991. It is based on or influenced with two programming languages: 1. ABC language,
More information15.1 Origins and Uses of Ruby
15.1 Origins and Uses of Ruby - Designed by Yukihiro Matsumoto; released in 1996 - Use spread rapidly in Japan - Use is now growing in part because of its use in Rails - A pure object-oriented purely interpreted
More informationCIS192: Python Programming
CIS192: Python Programming Introduction Harry Smith University of Pennsylvania January 18, 2017 Harry Smith (University of Pennsylvania) CIS 192 Lecture 1 January 18, 2017 1 / 34 Outline 1 Logistics Rooms
More information2 nd Week Lecture Notes
2 nd Week Lecture Notes Scope of variables All the variables that we intend to use in a program must have been declared with its type specifier in an earlier point in the code, like we did in the previous
More informationUNIVERSITÀ DI PADOVA. < 2014 March >
UNIVERSITÀ DI PADOVA < 2014 March > Easy-to-learn: Python has relatively few keywords, simple structure, and a clearly defined syntax. Easy-to-read: Python code is much more clearly defined and visible
More informationSTSCI Python Introduction. Class URL
STSCI Python Introduction Class 2 Jim Hare Class URL www.pst.stsci.edu/~hare Each Class Presentation Homework suggestions Example files to download Links to sites by each class and in general I will try
More informationUNIT- 3 Introduction to C++
UNIT- 3 Introduction to C++ C++ Character Sets: Letters A-Z, a-z Digits 0-9 Special Symbols Space + - * / ^ \ ( ) [ ] =!= . $, ; : %! &? _ # = @ White Spaces Blank spaces, horizontal tab, carriage
More informationVLC : Language Reference Manual
VLC : Language Reference Manual Table Of Contents 1. Introduction 2. Types and Declarations 2a. Primitives 2b. Non-primitives - Strings - Arrays 3. Lexical conventions 3a. Whitespace 3b. Comments 3c. Identifiers
More informationStandard 11. Lesson 9. Introduction to C++( Up to Operators) 2. List any two benefits of learning C++?(Any two points)
Standard 11 Lesson 9 Introduction to C++( Up to Operators) 2MARKS 1. Why C++ is called hybrid language? C++ supports both procedural and Object Oriented Programming paradigms. Thus, C++ is called as a
More informationGraphQuil Language Reference Manual COMS W4115
GraphQuil Language Reference Manual COMS W4115 Steven Weiner (Systems Architect), Jon Paul (Manager), John Heizelman (Language Guru), Gemma Ragozzine (Tester) Chapter 1 - Introduction Chapter 2 - Types
More informationITP 342 Mobile App Dev. Strings
ITP 342 Mobile App Dev Strings Strings You can include predefined String values within your code as string literals. A string literal is a sequence of characters surrounded by double quotation marks (").
More informationLISTS WITH PYTHON. José M. Garrido Department of Computer Science. May College of Computing and Software Engineering Kennesaw State University
LISTS WITH PYTHON José M. Garrido Department of Computer Science May 2015 College of Computing and Software Engineering Kennesaw State University c 2015, J. M. Garrido Lists with Python 2 Lists with Python
More informationScheme Quick Reference
Scheme Quick Reference COSC 18 Winter 2003 February 10, 2003 1 Introduction This document is a quick reference guide to common features of the Scheme language. It is by no means intended to be a complete
More informationDecaf Language Reference Manual
Decaf Language Reference Manual C. R. Ramakrishnan Department of Computer Science SUNY at Stony Brook Stony Brook, NY 11794-4400 cram@cs.stonybrook.edu February 12, 2012 Decaf is a small object oriented
More information6. Data Types and Dynamic Typing (Cont.)
6. Data Types and Dynamic Typing (Cont.) 6.5 Strings Strings can be delimited by a pair of single quotes ('...'), double quotes ("..."), triple single quotes ('''...'''), or triple double quotes ("""...""").
More informationPython. Executive Summary
Python Executive Summary DEFINITIONS OBJECT: a unit of data of a particular type with characteristic functionality (i.e., methods and/or response to operators). Everything in Python is an object. "atomic"
More informationIn addition to the primary macro syntax, the system also supports several special macro types:
The system identifies macros using special parentheses. You need to enclose macro expressions into curly brackets and the percentage symbol: {% expression %} Kentico provides an object-oriented language
More informationFRAC: Language Reference Manual
FRAC: Language Reference Manual Justin Chiang jc4127 Kunal Kamath kak2211 Calvin Li ctl2124 Anne Zhang az2350 1. Introduction FRAC is a domain-specific programming language that enables the programmer
More informationAbout Python. Python Duration. Training Objectives. Training Pre - Requisites & Who Should Learn Python
About Python Python course is a great introduction to both fundamental programming concepts and the Python programming language. By the end, you'll be familiar with Python syntax and you'll be able to
More informationPython review. 1 Python basics. References. CS 234 Naomi Nishimura
Python review CS 234 Naomi Nishimura The sections below indicate Python material, the degree to which it will be used in the course, and various resources you can use to review the material. You are not
More informationCOMP519 Web Programming Lecture 17: Python (Part 1) Handouts
COMP519 Web Programming Lecture 17: Python (Part 1) Handouts Ullrich Hustadt Department of Computer Science School of Electrical Engineering, Electronics, and Computer Science University of Liverpool Contents
More information