Week one summary (AP CSP)

Monday Summary:

During monday: we were able to have more time to work on our blog for the up and coming tools check. We were anticipating and were very nervous about what grade we would get. We learned that if we did everything we were supposed to we’d only get a 90% but only and only if we go above and beyong we would receive higher than a 90%. I was researching the web on how to make a blog homepage better to impress our teacher and took some basic markdown cheat sheets to make my page look more appealing. We learned that markdown is one of the simplest languages to learn to convey basic information like we did on blogs. Some markdown commands I learned during this process are:

Basic Markdown Commands

  1. Headers:
    • # Header 1
    • ## Header 2
    • ### Header 3
    • Create titles of different sizes by using one to six # symbols in the beginning of a line.
  2. Emphasis:
    • *italic* or _italic_
    • **bold** or __bold__
    • Create italic or bold text using asterisks * to bold or underscores _ to italicise.
  3. Lists:
    • Unordered List: - Item 1 or * Item 1
    • Ordered List: 1. Item 1
    • Create unordered and ordered lists by starting lines with -, *, or numbers to create a list.
  4. Links:
    • [Link Text](URL)
    • Create clickable links using square brackets [] for the link text and parentheses () for the URL.
  5. Images:
    • ![Alt Text](Image URL)
    • Embed images using an exclamation mark !, square brackets [] for alternate text (text describing the image), and parentheses () for the image URL.
  6. Blockquotes:
    • > Quote text
    • Create blockquotes using the > symbol in the beginning of a line.
  7. Code:
    • Inline Code: `code`
    • Code Block: Triple backticks (```) or indent with 4 spaces.
  8. Horizontal Rule:
    • --- or *** or ___
    • Create horizontal lines using three or more hyphens, asterisks, or/and underscores.
  9. Escape Characters:
    • \ before a special character
    • Use backslash \ to escape special Markdown characters (Ex: /!).
  10. Tables:
    • | Header 1 | Header 2 |
      | -------- | -------- |
      | Row 1    | Row 1    |
      | Row 2    | Row 2    |
      
    • Create tables using pipes | to separate columns and hyphens - to define headers.
  11. Task Lists:
    • - [ ] Task 1 for an unchecked task
    • - [x] Task 2 for a checked task
    • Create interactive lists using - [ ] or - [x].

During the day on Tuesday me and my partner, sri, were finalizing our blog as we were going to present tomorrow on wednesday. As soon as I opened my macbook my make command stopped working and I could not create the local serve to show my blog site. We were stressed and were freaking out because we did not know what the problem with this was. After an hour of not being able to fix it we proceeded to go to the teacher to ask him for help. We discussed that it was best for me to leave the machine with him to help him figure out the issue that I was facing, but during my 4th period class I was exploring the issue on my own when it was working again. During the troubleshoting of that command I was not able to make any process on that day so me and my partner proceeded to call to work on it more and prepare our “speech”.

We fixed the make command issue with these following commands:

bundle install and bundle update

On wednesday we were preparing last minute stuff for our live review. After doing the live review I realized that what we did was not enough for 2 points but we got a 1.85 for changing the theme. We changed our theme to the theme “modernist” and we realized that it looked the best after trying ot multiple themes that were available on jekyll. We changed the theme by removing the commenting hashtag in the _config.yml file. I also added my javascript calculator on wednesday after our live review. We added it by creating another ipynb file which stands for interactive python notebook file. We faced issues on making it appear on our blogs. But we figured that we didn’t follow the naming requirements, to publish a blog we need to have a specific dating format.

Calculator Link

On Thursday, we helped other groups with their live review based on our knowledge. We helped them import themes nd made sure why it changes the theme. We also helped the import the javascript calculator. We aren’t quiet at the level to underestand what each line does in the calculator but right now it is just important to understand how we put it up on our blog page.

On Friday we had our teacher give a stand up lecture on basic python inputs and outputs. During the lecture we were shown a bunch of types of quizes that we can make to store answers inputted by the user. Here are some of the commands we used in the calculator

In python there are a variety of ways to code a quiz. You can use basic print statements and input functions or you can use for loops to make the same quiz more concise.

The provided code is a basic quiz program that interacts with users. Here are the elements that make up most of the code:

  • import getpass, sys: This imports the modules.

  • def question_with_answers(prompt): This defines a function that prints a question, collects user input as an answer, and stores the answer

  • questions = 3: This is the total number of questions in the quiz.

  • correct_answers = 0: This variable keeps track of the amout of correct answers.

  • question_list: This list contains the questions for the quiz.

  • ans_list: This list holds the correct answers corresponding to the questions.

  • The for loop iterates over each question:

    • rsp = question_with_answers(question_list[i]): This line asks the user a question and stores their response into a variable

    • if ans_list[i] == rsp:: This checks if the user’s response matches the correct answer.

      • If the answer is correct, correct_answers added by one, and a success message is displayed.

      • If the answer is incorrect, an print message is shown to help them know they got the question wrong

  • At the end code displays a completion message for the quiz and calculates the user’s percentage score.

Python Quiz