Main content
AP®︎/College Computer Science Principles
Course: AP®︎/College Computer Science Principles > Unit 9
Lesson 2: Learn AP CSP exam pseudocodeAP CSP pseudocode vs. Python
Since AP CS Principles is taught with a variety of programming languages, the AP CSP exam questions use a pseudocode that represents fundamental programming concepts.
You can see the full pseudocode reference online here or on page 205 of the College Board AP CSP exam description.
AP CSP Pseudocode vs. Python
There are also some differences between the AP CSP pseudocode and the Python language syntax.
This table highlights the biggest differences:
Concept | Pseudocode | Python |
---|---|---|
Assignment | a ← expression | a = expression |
Equality | a = b | a == b |
Inequality | a ≠ b | a != b |
Repetition | REPEAT n TIMES | for i in range(n): |
Repetition | REPEAT UNTIL (condition) | while condition: |
List index | list[1] is first item | list[0] is first item |
To make sure you understand the pseudocode, practice using it in the exercises from our Programming and Algorithms units.
Want to join the conversation?
- I still think python is better(16 votes)
- I also agree. My biggest issue is that python indexes from 0 whereas AP Pseudocode indexes from 1.(7 votes)
- Is there any course on python by khan academy(6 votes)
- Not currently, no. There used to be a Python course on the site, but it's an older version of Python. You can still find the videos by searching for it on Khan Academy's YouTube channel.
The only languages taught are HTML/CSS, JavaScript, and SQL—all of which can be found on this page: https://www.khanacademy.org/computing/computer-programming.(8 votes)
- Python rules still kind of(4 votes)
- Python rules are pretty kewl.(1 vote)
- how can i learn python(3 votes)
- There is no course for Python on Khan Academy as of 2023, but you can go on YouTube and search for free Python courses. My favorite course is the "Python Full Course for Beginners" course which is by "Programming with Mosh". I used it and it helped me learn the basics. If you are looking for something more advanced do your own research and look for premium courses but remember they will be very expensive.
Thank you for reading.(1 vote)
- C++ is pretty good as well, probably better.(0 votes)
- It really depends on what you are trying to do. For example, C++ is good for high-performance low-level applications, but Python is one of the best languages for machine learning right now. Also, you will find a lot of people that dislike C++ for various reasons, like its opaque compiler error messages.(2 votes)