Update page 'Day 2 homework'

j
2023-03-30 07:21:20 +02:00
parent 2cb676b3e3
commit 8b30e16d58
+1 -1
@@ -9,7 +9,7 @@
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 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 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?
7. This is an HTTP server. Run it and connect to http://localhost:8000 . Why doesn't this do the same thing as what you see above? (don't forget to shut down the HTTP server afterward.) 7. This is an HTTP server. Run it and connect to http://localhost:8000 . Why doesn't this do the same thing as what you see above? (don't forget to shut down the HTTP server afterward.)