roger:apcs-bpc
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
roger:apcs-bpc [2023/09/12 11:08] – appledog | roger:apcs-bpc [2023/09/15 05:47] (current) – removed appledog | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | = Basic Programming Concepts | ||
- | * for Roger | ||
- | We need to understand basic programming concepts like input and output. | ||
- | |||
- | Problem 1: Write a program that asks for your name, and then prints " | ||
- | |||
- | < | ||
- | |||
- | print(" | ||
- | |||
- | </ | ||
- | |||
- | Now I explain what this does and add; | ||
- | |||
- | < | ||
- | |||
- | name = " | ||
- | |||
- | print(" | ||
- | |||
- | </ | ||
- | |||
- | So the key is we need to add the name: | ||
- | |||
- | < | ||
- | |||
- | name = input(" | ||
- | |||
- | print(" | ||
- | |||
- | </ | ||
- | |||
- | This is the final version of the instruction program. Now we ask Roger to write a new program: Input your first name and last name, and write "Hello < | ||
- | |||
- | This is the program he wrote: | ||
- | |||
- | < | ||
- | |||
- | a = input(" | ||
- | c = input(" | ||
- | |||
- | print(" | ||
- | |||
- | </ | ||
- | |||
- | Mark: 100% | ||
- | Comment: Roger got the right answer, but I had to tell him to fix the English formatting, including to add a space between a + c. After he changed it to a + " " + c the program was acceptable for APSC. I'll give him the 100% for now, but otherwise a program with a missing space is at best 90% or 93%. |
roger/apcs-bpc.1694516882.txt.gz · Last modified: 2023/09/12 11:08 by appledog