Update page 'Day 2 homework'

j
2023-03-31 03:42:02 +02:00
parent 177a4654cc
commit 20dbfada1d
+1 -1
@@ -8,7 +8,7 @@
* s = "abcdefg" * s = "abcdefg"
2. For each of the types string, bytestring, integer, floating point, and imaginary literals, construct a 5x5 table showing what happens when the character "0" or number 0 is compared to each other type. 2. For each of the types string, bytestring, integer, floating point, and imaginary literals, construct a 5x5 table showing what happens when the character "0" or number 0 is compared to each other type.
3. Now do the same thing for the + and == operators for each pair of types two other 5x5 tables. 3. Now do the same thing for the + and == operators for each pair of types in two other 5x5 tables.
4. Write a small program that uses the AST module to open the lexer/parser example, and dumps the resulting AST. See if there are any arguments to the parse method which make the output easier to read. 4. Write a small program that uses the AST module to open the lexer/parser example, and dumps the resulting AST. See if there are any arguments to the parse method which make the output easier to read.
5. What does this do? `print("\007")` Can you figure out why? 5. What does this do? `print("\007")` Can you figure out why?
6. What does this do? `print("abcdefg\rhijklmnop")` Can you figure out why? 6. What does this do? `print("abcdefg\rhijklmnop")` Can you figure out why?