Translated Labs

YOU SAID:

STUDY GUIDE - Chapter 04 Strings and Text Files Find the answers by reading the text, reading the lecture notes, and writing code True/False Indicate whether the statement is true or false. TEXTBOOK SECTION 4.1 ____ 1. A data structure is a compound unit that consists of several smaller pieces of data. ____ 2. The string is a mutable data structure. ____ 3. Some applications extract portions of strings called characters. ____ 4. When used with strings, the left operand of Python’s in operator is a target substring and the right operand is the string to be searched. TEXTBOOK SECTION 4.2 ____ 5. Many applications now use data mangling to protect information transmitted on networks. ____ 6. A Caesar cipher uses a plaintext character to compute two or more encrypted characters, and each encrypted character is computed using two or more plaintext characters. TEXTBOOK SECTION 4.3 ____ 7. The decimal number system is also called the base ten number system. ____ 8. The two digits in the base two number system are 0 and 1. ____ 9. The absolute value of a digit is determined by raising the base of the system to the power specified by the position (baseposition). ____ 10. A binary number is sometimes referred to as a string of bits or a bit string. TEXTBOOK SECTION 4.4 ____ 11. A module behaves like a function, but has a slightly different syntax. ____ 12. A method is always called with a given data value called an object, which is placed before the method name in the call. ____ 13. A difference between functions and methods is that methods cannot return values. ____ 14. In Python, all data values are objects. ____ 15. The string method isalphabetic returns True if the string contains only letters or False otherwise. ____ 16. The string method isnumeric returns True if the string contains only digits or False otherwise. TEXTBOOK SECTION 4.5 ____ 17. Using a text editor such as Notepad or TextEdit, you can create, view, and save data in a text file. ____ 18. All data output to or input from a text file must be strings. ____ 19. Data can be output to a text file using a(n) output object. STUDY GUIDE - Chapter 04 Strings and Text Files Find the answers by reading the text, reading the lecture notes, and writing code ____ 20. When using the open function to open a file for output (i.e., using 'w' as the mode string), if the file does not exist, Python raises an error. ____ 21. The file method write expects a single string as an argument. ____ 22. When using the open function to open a file for input (i.e., using 'r' as the mode string), if the file does not exist, Python raises an error. ____ 23. After input is finished, another call to read returns an empty string to indicate that the end of the file has been reached. TEXTBOOK SECTION 4.6 ____ 24. The remove file system function is included in the os.path module. ____ 25. The exists file system function is included in the os.path module. ____ 26. The getsize(path) file system function returns the size of the object named by path in bytes. Multiple Choice Identify the choice that best completes the statement or answers the question. TEXTBOOK SECTION 4.1 ____ 27. Unlike an integer, which cannot be factored into more primitive parts, a string is a ____. a. record c. data field b. datum d. data structure ____ 28. Python’s ____ function returns a string’s length when it is passed a string. a. len c. siz b. length d. size ____ 29. When using the subscript operator, the integer expression is also called a(n) ____. a. suffix c. index b. step d. iterator ____ 30. To extract a substring, the programmer places a ____ in the subscript. a. . c. ; b. : d. , TEXTBOOK SECTION 4.2 ____ 31. ____ is a protocol for secure Web page transfer. a. HTTPS c. XML b. SHTTP d. FTPS ____ 32. A very simple encryption method that has been in use for thousands of years is called a(n) ____ cipher. a. RSA c. HTTPS b. Caesar d. block STUDY GUIDE - Chapter 04 Strings and Text Files Find the answers by reading the text, reading the lecture notes, and writing code ____ 33. The ____ function is the inverse of the ord function. a. dro c. chr b. rord d. in ____ 34. A(n) ____ cipher uses an invertible matrix to determine the values of the encrypted characters. a. RSA c. HTTPS b. Caesar d. block TEXTBOOK SECTION 4.3 ____ 35. Each digit or bit in a binary number has a positional value that is a power of ____. a. 0 c. 2 b. 1 d. 10 ____ 36. The decimal number 8 is expressed as ____ in binary. a. 100 c. 111 b. 110 d. 1000 ____ 37. The decimal number 6 is expressed as ____ in binary. a. 100 c. 111 b. 110 d. 1000 TEXTBOOK SECTION 4.4 ____ 38. Python includes a set of string operations called ____ that make tasks like counting the words in a single sentence easy. a. methods c. classes b. functions d. modules ____ 39. The string method ____ can be used to obtain a list of the words contained in an input string. a. substring c. words b. split d. strip ____ 40. The string method ____ returns a copy of the string, centered within the given number of columns. a. center c. format b. split d. strip ____ 41. The string method ____ returns the number of non-overlapping occurrences of a substring in the string. a. center c. count b. split d. strip ____ 42. The string method ____ returns a string that is the concatenation of the strings in the sequence. a. center c. concatenate b. split d. join ____ 43. The string method ____ returns a copy of the string converted to lowercase. a. lower c. lowerCase b. toLower d. toLowerCase ____ 44. The string method ____ returns a copy of the string with leading and trailing whitespace (tabs, spaces, newlines) removed. a. clean c. strip b. split d. trim STUDY GUIDE - Chapter 04 Strings and Text Files Find the answers by reading the text, reading the lecture notes, and writing code TEXTBOOK SECTION 4.5 ____ 45. Python’s open function, which expects a file pathname and a ____ string as arguments, opens a connection to the file on disk and returns a file object. a. reference c. pattern b. mode d. bit ____ 46. The newline escape character is ____. a. \n c. \eol b. \l d. \0 ____ 47. In Python, the values of most data types can be converted to strings by using the ____ function. a. convert c. str b. toString d. string ____ 48. The ____ method of a file object inputs a line of text and returns it as a string, including the newline. a. line c. readline b. read d. readLine ____ 49. The ____ method of a file object inputs the contents of a file and returns them as a single string. a. get c. readfile b. read d. getfile TEXTBOOK SECTION 4.6 ____ 50. The ____ file system function creates a new directory with the given name, and places it in the current working directory. a. chdir c. listdir b. getcwd d. mkdir ____ 51. The ____ file system function changes the current working directory. a. chdir c. listdir b. getcwd d. mkdir ____ 52. The ____ file system function returns the path of the current working directory. a. chdir c. listdir b. getcwd d. mkdir ____ 53. The ____ file system function returns a list of the names in the given directory. a. chdir c. listdir b. getcwd d. mkdir

INTO JAPANESE

スタディ ガイド - 第 04 文字列とテキスト ファイル検索テキスト、講義ノートや読み書き真/偽を示すコード ステートメントが true または false であるかどうかによって答え。 教科書のセクション 4.1 _ _ _ 1。データ構造は、データのいくつかの小さい部分から成っている合成の単位。 ____ 2.文字列は不変データ str

BACK INTO ENGLISH

Study Guide - to answer whether or not code no. 04 strings and text file search text, lecture notes and read/write true or false statement is either true or false. Section 4.1 of the textbooks _ _ _ 1. Data structures, from small portions of data.

INTO JAPANESE

スタディ ガイド - 第 04 のコード文字列とテキスト ファイル検索テキスト、講義ノートおよび読み取り/書き込みかどうかに答えるため true または false ステートメントは true または false のいずれかです。教科書 _ _ _ 1 のセクション 4.1。データ構造、データの小さな部分から。

Equilibrium found!

Come on, you can do better than that.

HOT PARTIES

You may want to crash these parties too

0
votes
25Nov09
1
votes
24Nov09
0
votes
25Nov09
1
votes
25Nov09
4
votes