Department of Computer Science and Technology, UTU

Size: px
Start display at page:

Download "Department of Computer Science and Technology, UTU"

Transcription

1 : 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 multiline statement? 3. What is block? 4. Which are data types in python? 5. What is difference between * and ** as parameter? 6. Which operator is used for slicing? 7. How Print statement can be written? 8. How augmented assignment differs from plain assignment? 9. Write the importance of line and indentation. 10. What is the difference between append() and extend() of List object. 11. What is short-circuit operator? 12. What is the purpose of del statement? 13. What is slicing? 14. What is mutable object? 15. What is difference between * and ** operator? 16. What does pass keyword indicates? 17. Define simple statement? 18. What does \ (backslash) character indicates? 19. How to specify multiline comment in python? Que: 2 Answer the following question in details. 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. 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. Ms. Bhumika Patel Page 1

2 20. Write a note on Python for being powerful programming language in your words. Que: 3 Select most appropriate answer from the given option. 1. What will be the output of following statement: >>> type( ) a. <type int > b. <type long > c. Error d. <type double > 2. What will be output of following statement: >>> abc +3 a. abc3 b. abc 3 c. Error d. abcabcabc 3. >>> abc *3 a. abcabcabc b. Error c. aaabbbccc d. abc3 4. >>>B = *1, a,2, b,3, c + >>>print [B.reverse()].sort() a. *1,2,3, a, b, c + b. Error c. * a, b, c,1,2,3+ d. None 5. >>>a = [1,2,3] >>>print ( sum :,2+3), list :,a a. Error b. sum : 5 list : [1,2,3] c. ( sum:,5) list : *1,2,3+ d. sum: 5 list *1,2,3+ 6. >>>a= Hello >>> A +a*2::+ a. Error b. Allo c. Alo d. Hello 7. >>>x=y=x=range(3) >>>print y a. Error b. 1 c. None d. [0,1,2] 8. >>> print Python s World Ms. Bhumika Patel Page 2

3 a. Error b. Python s World c. Python s World d. Python s World 9. >>>a=* a,1, b,2, c,3, d + >>>a[::-1] a. Error b. * a,1, b,2, c,3, d + c. None d. * d,3, c,2, b,1, a >>>a=* a,1, b,2, c,3, d + >>>a[:-5:] a. Error b. * a,1, b,2, c + c. * b,2, c,3, d + d. None 11. >>>a= j >>>a.image a. None b. 3.4j c. 3.4 d >>>2+4*3 >>>_*2 a. 0 b. 14 c. 28 d. Error 13. >>> < + Word *3+ > a. <Word> b. <Word3> c. <WordWordWord> d. Error 14. >>>a=( aa,123, r,45.43) >>>type(a) a. <type list > b. <type tuple > c. <type dict > d. Error 15. >>>a=(12,43, abc, p ) >>>a[2]+5 a. 48 b. Error c. None d >>>a=['a','b','c','d',1,23,45,3,23,5.4,22.2,"hello","bye"] Ms. Bhumika Patel Page 3

4 >>>a.index(23) a. 6 b. 5 c. 8 d. Error 17. >>>a=['d',1,23,45,3,23,"bye"] >>>a.remove(23) a. ['d',1,45,3,23,"bye"] b. ['d',1,23,45,3,"bye"] c. 23 d. Error 18. >>>a=['d',1,23,45,3,23,"bye"] >>>a.count(11) a. Error b. 1 c. 0 d. None 19. >>>L=[] >>>s=[[1],[2]] >>>s.extend(l) >>>print s a. [] b. [[1],[2]] c. Error d. [[1],[2],[]] 20. >>>a=['a','b','c','d',1,23,45,3,23,5.4,22.2,"hello","bye"] >>>del a[1:1:] a. b b. 0 c. Error d. None Que 4: Fill in the blanks. 1. Using and you can create data values of other types. 2. Strings in python are. 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. Ms. Bhumika Patel Page 4

5 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 statement and Classes Que: 1 Answer the following question 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. 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? Que: 2 Answer the following question in details. 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. 13. Explain inheritance with example. Ms. Bhumika Patel Page 5

6 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. Que: 3 Select most appropriate answer from the given option. 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 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 Ms. Bhumika Patel Page 6

7 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 Que 4: Fill in the blanks. 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. Ms. Bhumika Patel Page 7

8 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 Que: 1 Answer the following question 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? 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? Que: 2 Answer the following question in details. 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. Ms. Bhumika Patel Page 8

9 10. Write a note on set of characters pattern matching expression. 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. Que: 3 Select most appropriate answer from the given option. 1. String is a type of a. Sequence b. List c. Set d. Dictionary 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. Option which matches empty string but only at the start of the whole string is a. \A b. \B c. \M d. \E 6. (?#...) represents a. Content of parenthesis is comment Ms. Bhumika Patel Page 9

10 b. Content of parenthesis is quickly executable c. Content of parenthesis is look ahead assertation d. Content of parenthesis 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() b. split() c. subn() d. index() 14. To match the beginning of the string element is useful. a. $ b. ^ c. % d.! Ms. Bhumika Patel Page 10

11 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 21. import re sum = 0 pattern = 'back' if re.match(pattern, 'backup.txt'): sum += 1 if re.match(pattern, 'text.back'): sum += 2 if re.search(pattern, 'backup.txt'): sum += 4 if re.search(pattern, 'text.back'): sum += 8 print sum a. 3 b. 13 c. 4 Ms. Bhumika Patel Page 11

12 d. 2 Que 4: Fill in the blanks. 1. To convert string in title case and methods are useful. 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. Unit 4:File and Text operations Que: 1 Answer the following question in short. 1. What is file? 2. List out various operations that can be perform on a file. 3. What are the permissions for the file? 4. What is the purpose of listdir() function? 5. What is os.path module? 6. Which method is used to remove current directory? 7. What is the purpose of join() method in file system? 8. List out items of state tuple. 9. List out various modes available for state module. 10. What cmp does in the filecmp module? 11. What is file object? 12. List out various file modes. 13. What is buffering? 14. Which method is used to print total number of lines in a file? 15. What is the purpose of flush() method? 16. What is file object? 17. What is the difference between w and w+ mode? Ms. Bhumika Patel Page 12

13 18. Explain open() method. 19. Differentiate binary and static mode. 20. What is sequential and non-sequential access? Que: 2 Answer the following question in details. 1. Write a short note on python file system. 2. Explain os module, OSError Exception and errno module in detail. 3. What are the various directory functions of the os module? 4. Explain os.path module function in detail with appropriate examples. 5. Write a note on stat module. 6. Explain filecmp module with example. 7. Exaplain various file descriptor operations in detail. 8. Write a note on file object. 9. Explain attributes and methods of file object. 10. Write a note on fileinput module. 11. Explain linecache module in detail. 12. Explain text input and output in detail. 13. Explain getpass module with appropriate example. 14. Write a note on readline module. 15. What is cursor package? 16. Explain iteration on file object with example. 17. Explain polymorphism in detail. 18. Explain path string attributes of the os module. 19. Write a note on shutil module with appropriate examples. 20. What is standard input? Que: 3 Select most appropriate answer from the given option. What will be the output of following line of code: 1. print r"\nwoow" a. the text exactly like this: r"\nwoow" b. the text like exactly like this: \nwoow c. the letter r and then newline then the text: woow d. the letter r then the text like this: nwoow 2. print "hello" 'world' a. on one line the text: hello world b. on one line the text: helloworld c. hello on one line and world on the next line d. syntax error, this python program will not run 3. f = open("f1.txt","w") f.write("hello how are you") f.read() a. hello how are you b. Hello how are you Ms. Bhumika Patel Page 13

14 c. Error d. Nothing will be printed 4. f = open("f1.txt","r") f.close f.closed a. Error b. True c. False d. Nothing will be printed 5. f = open("f1.txt","w") f.write("hello how are you") f = open("f1.txt","r") f.seek(5) f.read() a. "o how are you" b. how are you c. how are you d. Error 6. f = open("f1.txt","w") f.write("hello how are you") f = open("f1.txt","r") f.read() f.read() a. Hello how are you b. Hello how are you c. d. Error 7. f = open("f1.txt","w") f.write("hello how are you") f = open("f1.txt","r") f.seek(3) f.tell() a. 'lo how are you' b. 3 c. 3L d. Nothing will be printed 8. f = open("f1.txt","w") f.name() a. f1.txt b. Error c. f1.txt d. Nothing will be printed Ms. Bhumika Patel Page 14

15 9. f = open("f1.txt","r") f.seek(50) f.read() a. Error b. Hello how are you c. are you d. 10. f = open( f1.txt, r ) f.seek(-1) a. hello how are you b. Hello how are you c. Error d. Nothing will be printed 11. method returns the access mode of file. a. access b. mode c. chmode d. isatty 12. method returns one line from file. a. read b. readline c. readlines d. readone 13. method is used to set the file pointer at any particular position. a. tell b. seek c. reach d. set 14. method returns a tuple of substring that matches pattern. a. group b. groups c. expand d. match 15. match object consists read only attribute which gives the last index of match substring. a. lastgroup b. lastindex c. end d. eol 16. The module supplies symbolic names for error code numbers. a. exception b. error c. errno d. noerrror 17. method ofos module is used to remove file from particular location. a. remove b. rmdir Ms. Bhumika Patel Page 15

16 c. removedirs d. delete 18. method returns a pair of string in which path is separated from file. a. split b. splitext c. splitdrive d. sep 19. To compare two files named by path string method is used. a. compare b. cmp c. cmpfiles d. dircmp 20. method is used to copy just the content of one file to another except permission of file. a. copy b. copy2 c. copyfile d. copyfileobj Que 4: Fill in the blanks. 1. The string that denotes current directory is. 2. To indicate line separator string is used. 3. method provides 10 items of information about file or directory path. 4. method returns true if string is file. 5. To separate drive name from path method is useful. 6. method converts path value in normal case. 7. To merge multiple path method is helpful. 8. The module supplies methods to copy and move files. 9. getpass() method belongs to module. 10. The readline module contains method to add string as a line at the end of the history buffer. 11. getpass module contains method to return the current user s username. 12. Instance of OSError indicates numeric code of the operating system error. 13. method returns the current position of file pointer. 14. After f.close() read only attribute returns true. 15. flush() method requests that f s buffer to be the operating system. 16. read only attribute returns the mode of currently open file. 17. method sets the file pointer at particular position in file. 18. method returns total number of lines of a file. 19. The os module contains method to change the current directory. 20. method unlinks the file from path. Unit 5:Tkinter and Events Que: 1 Answer the following question in short. 1. What is GUI? 2. What is purpose of Tkinter module? Ms. Bhumika Patel Page 16

17 3. What is importance of mainloop() method? 4. What is container? 5. What is widget? 6. What is dialog? 7. List out common widget options. 8. How to set background image in window? 9. List out file dialog methods. 10. What is the purpose of command property? 11. What is the importance of config() method in window? 12. Explain iconify and deiconify property. 13. What is the meaning of withdraw window? 14. How to set menu bar in window? 15. What is the purpose of resizable() method? 16. List out menu specific methods. 17. What is the purpose of cascade option in menu? 18. What is event? List out event types. 19. List out mouse events. 20. What is the purpose of bind() method? Que: 2 Answer the following question in details. 1. Explain events with example. 2. Write a note on text widget with appropriate example. 3. Explain the purpose of container widget with example. 4. Write a note on tkfiledialog module. 5. Explain color options with appropriate examples. 6. Write a note on dialog with appropriate example. 7. Write a note on common widget methods. 8. Explain button and checkbutton control with example. 9. Write a note on entry and listbox with appropriate example. 10. Explain container widget with example. 11. Write a note on menu with example. 12. Explain Text widget with example. 13. Write a note on Tkinter event with its type. 14. Explain event replated methods. 15. Explain other callback related methods with example. 16. Explain scrollbar control with example. 17. Explain tkcolorchosser module with example. 18. Explain keyboard event with appropriate example. 19. Explain mouse event with appropriate example. 20. What is canvas widget? Que: 3 Select most appropriate answer from the given option. 1. Which method is used to handle the control of the widget? a. pack() b. mainloop() Ms. Bhumika Patel Page 17

18 c. command() d. bind() 2. Which of the following is not the type of dialog box? a. showerror b. showinfo c. showwarning d. showwarn 3. Which of the following is used to take input as yes or no from user? a. askokcancel b. askquestion c. askyesno d. askretrycancel 4. Which of the following is not the method of thfiledialog? a. askdirectory b. askfile c. askopenfilename d. askopenfilenames 5. Which option is used to set the active foreground color? a. highlightcolor b. highlightforeground c. activeforeground d. activebackground 6. Which option is used to set callable method? a. anchor b. bind c. command d. none 7. Which method is used to close the window? a. quit() b. withdraw() c. close() d. exit() 8. Which of the following method works similar to command option of widget? a. call() b. invoke() c. bind() d. none of the above 9. Which of the following is widget of container type? a. Frame b. Toplevel c. Entry d. Listbox 10. Which of the following widget contains get() and set() method to get and set an integer value? a. Entry b. Listbutton c. Scale Ms. Bhumika Patel Page 18

19 d. Scrollbar 11. Which of the following method is used to connect event with action? a. bind() b. binder() c. command() d. none 12. Which of the following is not the event of mouse? a. Button-1 b. Button-3 c. B3-Motion d. B1-Click 13. Which of the following method is used to release the connection among widget and event? a. release() b. unbind() c. unbinder() d. none 14. Which of the following event object describes key s symbolic name? a. Key b. Keyname c. Keysym d. Char 15. Which of the following is not the type of keyboard event? a. Key b. Special key c. Normal key d. Numeric key 16. Which of the following event handles the enter key press? a. <Enter> b. <Return> c. <In> d. None 17. Which of the following option is used to set the shortcut in menu option? a. Key b. Underline c. Invoke d. None 18. Which of the following method is used to maximize the window from taskbar? a. max b. deiconify c. maximize d. none 19. Which of the following is not the Tkinter widget? a. Button b. Textbox c. Listbox d. Scale Ms. Bhumika Patel Page 19

20 20. Which of the following module is mandatory to import for widget development? a. tk b. tcl c. tkinter d. Tkinter Que 4: Fill in the blanks. 1. For tkmessagebox parameter asks user yes/no question. 2. To open a file method of tkfiledialog module is helpful. 3. To set the high light color method is used. 4. To set extra space for widget and method is used. 5. To show the three dimensional effect method is used. 6. option is set to callable arguments, executes when user clicks on the widget. 7. option is used to set the display text of any widget. 8. To configure any widget with event method is used. 9. Underline option sets the indexed character as shortcut. 10. mainloop() method allows event to enter into. 11. method returns width of window format. 12. module needs to be imported before developing any widget. 13. class implements a widget that lets the user input a value by sliding a cursor along a line. 14. To set window as icon on taskbar method is us 15. ed. 16. and are container widget to create multiple windows. 17. To add separator in menu method is used. 18. To set action on left mouse click event is used. 19. event is used to set the event on mouse movement. 20. To remove all callbacks method is used. 21. event is used to handle the event of key press. Unit 6:Working with Database Que: 1 Answer the following question in short. 1. Which is inbuilt DBMS with python? 2. List out various factory functions. 3. Which are type descriptor attributes? 4. What is the purpose of connect() method? 5. What is the purpose of commit() method? 6. What is cursor? 7. What is the purpose of execute() method in cursor? 8. What is the difference between execute() and executemany() methods? 9. Differentiate fetchall(), fetchmany(), and fetchone()? 10. What is the purpose of rowcount() method? 11. List out various DBAPI compliant modules. 12. What is the purpose of rollback() method? 13. Differentiate Timestamp() and TimestampFromTicks(). 14. What is the purpose of ROWID in type descriptor attributes? Ms. Bhumika Patel Page 20

21 15. Explain connect function. 16. What is the purpose of qmark in query execution? 17. What ADO and COM stands for? 18. What is the purpose of host in connect function? Que: 2 Answer the following question in details. 1. Write a short note on parameter style in Python. 2. Explain connection object with all its methods. 3. Write a note on factory function with all its methods. 4. Write a short note on MySQL. 5. Write source code to create and connect database and explain it. 6. Write source code to insert records in database with proper explanation. 7. Write source code to retrieve data from database and explain it. 8. Write source code to delete data from database with proper explanation. Que 3: Fill in the blanks. 1. After importing DBAPI compliant module, call the module s function. 2. A DBAPI compliant module has an attribute to identify the style of markers used as placeholders for parameters. 3. method is used to determine runtime parameter values. 4. With you pass to execute a single statement string, with a placeholder instead a value. 5. performs parsing and preparation just once, giving potentially better performance. 6. The read only string attribute tells your program how it should use parameter substitution with that module. 7. Parameter passed to the database via must be of the right type. 8. method of factory function returns an object representing the string of bytes as a BLOB. 9. A cursor instance s attribute describes the types and other characteristics of each column of query. 10. attribute of DBAPI compliant module describes columns containing numbers of any kind. 11. The DBAPI module does not mandate, that accept named argument. 12. method terminates the database connection and release all the related resources. 13. method returns new instance of class Cursor. 14. Parameter is a sequence when the module s is format, numeric, or qmark. 15. The DBAPI compliant does not support the SQL clause. 16. method closes the cursor and releases all related resources. 17. method is used to roll back the current transection in database. 18. To get all remaining result rows from the last query as a sequence of tuple method is used. 19. A read only attribute that specifies the number of rows fetched. 20. method is used to commit the current database transection. Ms. Bhumika Patel Page 21

Babu Madhav Institute of Information Technology, UTU 2015

Babu Madhav Institute of Information Technology, UTU 2015 Five years Integrated M.Sc.(IT)(Semester 5) Question Bank 060010502:Programming in Python Unit-1:Introduction To Python Q-1 Answer the following Questions in short. 1. Which operator is used for slicing?

More information

Programming in Python 2014

Programming in Python 2014 Practical No. 1 Write a program that prompts the user for following information: a. Number b. Choice (Choice value can be 1 or 2) If user enters choice 1 then it should check whether the given number is

More information

Table of Contents. Preface... xxi

Table 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 information

Glossary. For Introduction to Programming Using Python By Y. Daniel Liang

Glossary. 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 information

Chapter 1 Summary. Chapter 2 Summary. end of a string, in which case the string can span multiple lines.

Chapter 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 information

Webgurukul Programming Language Course

Webgurukul 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 information

Introduction to Python

Introduction 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 information

Contents. Figures. Tables. Examples. Foreword. Preface. 1 Basics of Java Programming 1. xix. xxi. xxiii. xxvii. xxix

Contents. 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

[CHAPTER] 1 INTRODUCTION 1

[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 information

Python Training. Complete Practical & Real-time Trainings. A Unit of SequelGate Innovative Technologies Pvt. Ltd.

Python 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 information

Pace University. Fundamental Concepts of CS121 1

Pace University. Fundamental Concepts of CS121 1 Pace University Fundamental Concepts of CS121 1 Dr. Lixin Tao http://csis.pace.edu/~lixin Computer Science Department Pace University October 12, 2005 This document complements my tutorial Introduction

More information

The SPL Programming Language Reference Manual

The 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 information

IT 374 C# and Applications/ IT695 C# Data Structures

IT 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 information

Interactive use. $ python. >>> print 'Hello, world!' Hello, world! >>> 3 $ Ctrl-D

Interactive 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 information

\n is used in a string to indicate the newline character. An expression produces data. The simplest expression

\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

GIS 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 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 information

STSCI Python Introduction. Class URL

STSCI 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 information

The PCAT Programming Language Reference Manual

The 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 information

Interactive use. $ python. >>> print 'Hello, world!' Hello, world! >>> 3 $ Ctrl-D

Interactive 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 information

Weiss Chapter 1 terminology (parenthesized numbers are page numbers)

Weiss 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 information

Python in 10 (50) minutes

Python 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 information

Python I. Some material adapted from Upenn cmpe391 slides and other sources

Python 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 information

Introduction to Programming Using Java (98-388)

Introduction 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 information

PYTHON CONTENT NOTE: Almost every task is explained with an example

PYTHON 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 information

PYTHON FOR KIDS A Pl ayfu l I ntrodu ctio n to Prog r am m i ng J a s o n R. B r i g g s

PYTHON FOR KIDS A Pl ayfu l I ntrodu ctio n to Prog r am m i ng J a s o n R. B r i g g s PYTHON FO R K I D S A P l ay f u l I n t r o d u c t i o n to P r o g r a m m i n g Jason R. Briggs Index Symbols and Numbers + (addition operator), 17 \ (backslash) to separate lines of code, 235 in strings,

More information

Duration: 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 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 information

Programming in Python 2016

Programming in Python 2016 Practical No. 1 Write a program that prompts the user for input and check whether input contain repeated characters or numbers or not. If it contain repeated characters then count the total repeated characters

More information

Python Scripting for Computational Science

Python Scripting for Computational Science Hans Petter Langtangen Python Scripting for Computational Science Third Edition With 62 Figures 43 Springer Table of Contents 1 Introduction... 1 1.1 Scripting versus Traditional Programming... 1 1.1.1

More information

Advanced Python. Executive Summary, Session 1

Advanced 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 information

CS260 Intro to Java & Android 03.Java Language Basics

CS260 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 information

And Parallelism. Parallelism in Prolog. OR Parallelism

And 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 information

Script language: Python Data structures

Script 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 information

CONTENTS. PART 1 Structured Programming 1. 1 Getting started 3. 2 Basic programming elements 17

CONTENTS. PART 1 Structured Programming 1. 1 Getting started 3. 2 Basic programming elements 17 List of Programs xxv List of Figures xxix List of Tables xxxiii Preface to second version xxxv PART 1 Structured Programming 1 1 Getting started 3 1.1 Programming 3 1.2 Editing source code 5 Source code

More information

Python Scripting for Computational Science

Python Scripting for Computational Science Hans Petter Langtangen Python Scripting for Computational Science Third Edition With 62 Figures Sprin ger Table of Contents 1 Introduction 1 1.1 Scripting versus Traditional Programming 1 1.1.1 Why Scripting

More information

CERTIFICATE IN WEB PROGRAMMING

CERTIFICATE IN WEB PROGRAMMING COURSE DURATION: 6 MONTHS CONTENTS : CERTIFICATE IN WEB PROGRAMMING 1. PROGRAMMING IN C and C++ Language 2. HTML/CSS and JavaScript 3. PHP and MySQL 4. Project on Development of Web Application 1. PROGRAMMING

More information

Advanced Algorithms and Computational Models (module A)

Advanced 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 information

Model Question Paper. Credits: 4 Marks: 140

Model Question Paper. Credits: 4 Marks: 140 Model Question Paper Subject Code: BT0075 Subject Name: RDBMS and MySQL Credits: 4 Marks: 140 Part A (One mark questions) 1. MySQL Server works in A. client/server B. specification gap embedded systems

More information

There are four numeric types: 1. Integers, represented as a 32 bit (or longer) quantity. Digits sequences (possibly) signed are integer literals:

There 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 information

GE PROBLEM SOVING AND PYTHON PROGRAMMING. Question Bank UNIT 1 - ALGORITHMIC PROBLEM SOLVING

GE 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 information

Full file at

Full 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 information

Regular Expressions. Regular Expression Syntax in Python. Achtung!

Regular Expressions. Regular Expression Syntax in Python. Achtung! 1 Regular Expressions Lab Objective: Cleaning and formatting data are fundamental problems in data science. Regular expressions are an important tool for working with text carefully and eciently, and are

More information

PTN-202: Advanced Python Programming Course Description. Course Outline

PTN-202: Advanced Python Programming Course Description. Course Outline PTN-202: Advanced Python Programming Course Description This 4-day course picks up where Python I leaves off, covering some topics in more detail, and adding many new ones, with a focus on enterprise development.

More information

Object oriented programming. Instructor: Masoud Asghari Web page: Ch: 3

Object 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 information

5. Single-row function

5. Single-row function 1. 2. Introduction Oracle 11g Oracle 11g Application Server Oracle database Relational and Object Relational Database Management system Oracle internet platform System Development Life cycle 3. Writing

More information

Decaf Language Reference Manual

Decaf 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 information

Java+- Language Reference Manual

Java+- 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 information

AFN-1255 PCA131 P.G.D.C.A. DIPLOMA EXAMINATION, MAY 2011 First Semester Computer Applications FUNDAMENTALS OF DIGITAL COMPUTER (Non-CBCS 2004 onwards) Time : 3 Hours Maximum : 100 Marks Part A (15 1 =

More information

06/11/2014. Subjects. CS Applied Robotics Lab Gerardo Carmona :: makeroboticsprojects.com June / ) Beginning with Python

06/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 information

egrapher Language Reference Manual

egrapher Language Reference Manual egrapher Language Reference Manual Long Long: ll3078@columbia.edu Xinli Jia: xj2191@columbia.edu Jiefu Ying: jy2799@columbia.edu Linnan Wang: lw2645@columbia.edu Darren Chen: dsc2155@columbia.edu 1. Introduction

More information

Absolute C++ Walter Savitch

Absolute 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 information

PYTHON- AN INNOVATION

PYTHON- 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 information

Regexator. User Guide. Version 1.3

Regexator. User Guide. Version 1.3 Regexator User Guide Version 1.3 Regexator User Guide C O N T E N T S 1 INTRODUCTION 5 1.1 Main Window 5 1.2 Regex Categories 6 1.3 Switcher 6 1.4 Tab Reordering 6 2 PROJECT EXPLORER 7 2.1 Project 7 2.2

More information

Variable and Data Type I

Variable 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 information

Preface... (vii) CHAPTER 1 INTRODUCTION TO COMPUTERS

Preface... (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 information

Full file at

Full file at Java Programming, Fifth Edition 2-1 Chapter 2 Using Data within a Program At a Glance Instructor s Manual Table of Contents Overview Objectives Teaching Tips Quick Quizzes Class Discussion Topics Additional

More information

Overview. - General Data Types - Categories of Words. - Define Before Use. - The Three S s. - End of Statement - My First Program

Overview. - General Data Types - Categories of Words. - Define Before Use. - The Three S s. - End of Statement - My First Program Overview - General Data Types - Categories of Words - The Three S s - Define Before Use - End of Statement - My First Program a description of data, defining a set of valid values and operations List of

More information

CSc 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 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 information

Language Basics. /* The NUMBER GAME - User tries to guess a number between 1 and 10 */ /* Generate a random number between 1 and 10 */

Language 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 information

DaMPL. Language Reference Manual. Henrique Grando

DaMPL. 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 information

Overview of List Syntax

Overview of List Syntax Lists and Sequences Overview of List Syntax x = [0, 0, 0, 0] Create list of length 4 with all zeroes x 4300112 x.append(2) 3 in x x[2] = 5 x[0] = 4 k = 3 Append 2 to end of list x (now length 5) Evaluates

More information

C How to Program, 6/e by Pearson Education, Inc. All Rights Reserved.

C How to Program, 6/e by Pearson Education, Inc. All Rights Reserved. C How to Program, 6/e 1992-2010 by Pearson Education, Inc. An important part of the solution to any problem is the presentation of the results. In this chapter, we discuss in depth the formatting features

More information

Python. Executive Summary

Python. 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 information

Introduction to Computer Programming CSCI-UA 2. Review Midterm Exam 1

Introduction 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 information

This course is designed for anyone who needs to learn how to write programs in Python.

This course is designed for anyone who needs to learn how to write programs in Python. Python Programming COURSE OVERVIEW: This course introduces the student to the Python language. Upon completion of the course, the student will be able to write non-trivial Python programs dealing with

More information

Chapter 2 Using Data. Instructor s Manual Table of Contents. At a Glance. Overview. Objectives. Teaching Tips. Quick Quizzes. Class Discussion Topics

Chapter 2 Using Data. Instructor s Manual Table of Contents. At a Glance. Overview. Objectives. Teaching Tips. Quick Quizzes. Class Discussion Topics Java Programming, Sixth Edition 2-1 Chapter 2 Using Data At a Glance Instructor s Manual Table of Contents Overview Objectives Teaching Tips Quick Quizzes Class Discussion Topics Additional Projects Additional

More information

Python Tutorial. Day 1

Python 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 information

Programming Training. This Week: Tkinter for GUI Interfaces. Some examples

Programming Training. This Week: Tkinter for GUI Interfaces. Some examples Programming Training This Week: Tkinter for GUI Interfaces Some examples Tkinter Overview Set of widgets designed by John K. Ousterhout, 1987 Tkinter == Tool Kit Interface Mean to be driven by Tcl (Toolkit

More information

ADVANTAGES. Via PL/SQL, all sorts of calculations can be done quickly and efficiently without use of Oracle engine.

ADVANTAGES. Via PL/SQL, all sorts of calculations can be done quickly and efficiently without use of Oracle engine. 1 PL/SQL INTRODUCTION SQL does not have procedural capabilities. SQL does not provide the programming techniques of condition checking, looping and branching that is required for data before permanent

More information

CSI33 Data Structures

CSI33 Data Structures Outline Department of Mathematics and Computer Science Bronx Community College October 24, 2018 Outline Outline 1 Chapter 8: A C++ Introduction For Python Programmers Expressions and Operator Precedence

More information

Data Structures (list, dictionary, tuples, sets, strings)

Data 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 information

Part IV. More on Python. Tobias Neckel: Scripting with Bash and Python Compact Max-Planck, February 16-26,

Part 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 information

COMP519 Web Programming Lecture 17: Python (Part 1) Handouts

COMP519 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

About Python. Python Duration. Training Objectives. Training Pre - Requisites & Who Should Learn Python

About 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 information

Lecture 2 Tao Wang 1

Lecture 2 Tao Wang 1 Lecture 2 Tao Wang 1 Objectives In this chapter, you will learn about: Modular programs Programming style Data types Arithmetic operations Variables and declaration statements Common programming errors

More information

Fundamentals of Programming Session 4

Fundamentals of Programming Session 4 Fundamentals of Programming Session 4 Instructor: Reza Entezari-Maleki Email: entezari@ce.sharif.edu 1 Fall 2011 These slides are created using Deitel s slides, ( 1992-2010 by Pearson Education, Inc).

More information

COIMBATORE EDUCATIONAL DISTRICT

COIMBATORE EDUCATIONAL DISTRICT COIMBATORE EDUCATIONAL DISTRICT REVISION EXAMINATION JANUARY 2015 STD-12 COMPUTER SCIENCE ANSEWR KEY PART-I Choose the Correct Answer QNo Answer QNo Answer 1 B Absolute Cell Addressing 39 C Void 2 D

More information

Computer Hardware 6. The

Computer 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 information

UNIT- 3 Introduction to C++

UNIT- 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 information

LISTS 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 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 information

Strings. Upsorn Praphamontripong. Note: for reference when we practice loop. We ll discuss Strings in detail after Spring break

Strings. 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 information

GraphQuil Language Reference Manual COMS W4115

GraphQuil 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 information

STRUCTURING OF PROGRAM

STRUCTURING OF PROGRAM Unit III MULTIPLE CHOICE QUESTIONS 1. Which of the following is the functionality of Data Abstraction? (a) Reduce Complexity (c) Parallelism Unit III 3.1 (b) Binds together code and data (d) None of the

More information

Introduction to Visual Basic and Visual C++ Arithmetic Expression. Arithmetic Expression. Using Arithmetic Expression. Lesson 4.

Introduction to Visual Basic and Visual C++ Arithmetic Expression. Arithmetic Expression. Using Arithmetic Expression. Lesson 4. Introduction to Visual Basic and Visual C++ Arithmetic Expression Lesson 4 Calculation I154-1-A A @ Peter Lo 2010 1 I154-1-A A @ Peter Lo 2010 2 Arithmetic Expression Using Arithmetic Expression Calculations

More information

KEYBOARD SHORTCUTS AND HOT KEYS

KEYBOARD SHORTCUTS AND HOT KEYS KEYBOARD SHORTCUTS AND HOT KEYS Page 1 This document is devoted to using the keyboard instead of the mouse to perform tasks within applications. This list is by no means the "be all and end all". There

More information

Sprite an animation manipulation language Language Reference Manual

Sprite 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 information

Chapter 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. 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 information

ITP 342 Mobile App Dev. Strings

ITP 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 information

Cryptol version 2 Syntax

Cryptol 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 information

Python Working with files. May 4, 2017

Python Working with files. May 4, 2017 Python Working with files May 4, 2017 So far, everything we have done in Python was using in-memory operations. After closing the Python interpreter or after the script was done, all our input and output

More information

Part III Appendices 165

Part III Appendices 165 Part III Appendices 165 Appendix A Technical Instructions Learning Outcomes This material will help you learn how to use the software you need to do your work in this course. You won t be tested on it.

More information

Typescript on LLVM Language Reference Manual

Typescript 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 information

String Computation Program

String Computation Program String Computation Program Reference Manual Scott Pender scp2135@columbia.edu COMS4115 Fall 2012 10/31/2012 1 Lexical Conventions There are four kinds of tokens: identifiers, keywords, expression operators,

More information

COLLEGE OF ENGINEERING, NASHIK-4

COLLEGE 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 information

The Warhol Language Reference Manual

The Warhol Language Reference Manual The Warhol Language Reference Manual Martina Atabong maa2247 Charvinia Neblett cdn2118 Samuel Nnodim son2105 Catherine Wes ciw2109 Sarina Xie sx2166 Introduction Warhol is a functional and imperative programming

More information

I BSc(IT) [ Batch] Semester II Core: Object Oriented Programming With C plus plus - 212A Multiple Choice Questions.

I BSc(IT) [ Batch] Semester II Core: Object Oriented Programming With C plus plus - 212A Multiple Choice Questions. Dr.G.R.Damodaran College of Science (Autonomous, affiliated to the Bharathiar University, recognized by the UGC)Reaccredited at the 'A' Grade Level by the NAAC and ISO 9001:2008 Certified CRISL rated 'A'

More information

Index COPYRIGHTED MATERIAL

Index 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 information

The Decaf Language. 1 Lexical considerations

The Decaf Language. 1 Lexical considerations The Decaf Language In this course, we will write a compiler for a simple object-oriented programming language called Decaf. Decaf is a strongly-typed, object-oriented language with support for inheritance

More information

12/22/11. Java How to Program, 9/e. Help you get started with Eclipse and NetBeans integrated development environments.

12/22/11. Java How to Program, 9/e. Help you get started with Eclipse and NetBeans integrated development environments. Java How to Program, 9/e Education, Inc. All Rights Reserved. } Java application programming } Use tools from the JDK to compile and run programs. } Videos at www.deitel.com/books/jhtp9/ Help you get started

More information

CS 2316 Learning Objectives

CS 2316 Learning Objectives CS 2316 Learning Objectives This document lists the CS 2316 Learning Objectives and tries to give you an idea of what each learning objective encompases. Each learning objective will have a list of concepts

More information

Java 1.8 Programming

Java 1.8 Programming One Introduction to Java 2 Usage of Java 3 Structure of Java 4 Flexibility of Java Programming 5 Two Running Java in Dos 6 Using the DOS Window 7 DOS Operating System Commands 8 Compiling and Executing

More information