TimKillingsworth / Grocery-List-Script

SNHU IT140 Final Project Script Two

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Grocery List Script

This repository is used for the second assignment for the class IT-140-Q3788 Introduction to Scripting 18EW3 at Southern New Hampshire University. The task for this project is to create a very simple grocery list script. This script also emphasizes the importance of using lists, dictionaries and loop types within your script and how the use of those functions shapes your approach in creating a script. The task is broken down into three sections:

  • User Input
  • Loop through the grocery list
  • Provide output to the console

Build Status

Overview:

For your final project, you will be creating four small scripts. Collectively, the four scripts will demonstrate your ability to engage in the fundamental scripting and problem-solving approaches that are represented by the course outcomes. Reminder: This the first draft. Even if your script is not functioning perfectly, submit your draft and get feedback so that you can improve on it for the final submission in Module Five.

Prompt:

The list object type is one of the most important and frequently used types in a Python program. A list is a container, an object that groups related objects together. A list is also a sequence: The contained objects maintain a left-to-right positional ordering. Elements of the list can be accessed via indexing operations that specify the position of the desired element in the list. Each element in a list can be a different type, such as string, integer, float, or even other list. A dictionary is another type of container object that is different from sequences like strings, tuples, and lists. Dictionaries contain references to objects as key–value pairs: Each key in the dictionary is associated with a value, much like each word in an English language dictionary is associated with a definition. Unlike sequences, the elements of a dictionary do not have a relative ordering of positions. Adding a value to a dictionary can be done either with brackets or using the keyword dict. A programmer can use loops to execute the same code repeatedly as long as some condition is true. The loop expression is evaluated when the program reaches the loop statement. If the loop expression is true, then the indented code block, known as the loop body, is executed. At the end of the loop body, execution goes back to the while loop statement. The loop expression is evaluated again, and if true, the loop body is executed again. But, if the expression evaluates to false, then execution instead proceeds to code below the loop body. Each execution of the loop body is called an iteration, and looping is also called iterating. Your task for this project is to create a very simple grocery list script. This script emphasizes the importance of using lists, dictionaries, and loop types within your script, and how the use of those functions shapes your approach to creating a script. You will be working on this project in the Project Two: Grocery List Script module in Codio. Following the directions in that module, you will also be able to determine the exact placement of the comments you will need to make in the code. Follow the directions in the module in Codio to walk through the activity. Your script should address the following critical elements:

  • In Your Script (Annotated Text File) Refer to the directions in the module in Codio for how to export out and comment your completed script.
    • Identify examples of four uses of list operations in the script using comments in your code. Be sure your examples address each of the following:
      • Creating lists
      • Adding and removing data from a list
      • Accessing values in a list
      • Modifying values in a list
    • Identify examples of four uses of dictionary operations using comments in your code. Be sure your examples address each of the following:
      • Creating dictionaries
      • Adding and removing key-value pairs
      • Accessing values using keys
      • Modifying values
    • Identify examples of three uses of loop structures using comments in your code. Be sure your examples address each of the following:
      • Item-based for loops
      • Index-based (range) for loops
      • While loops

Reminder:

The following critical element is not submitted with your draft, but you should be sure to consider the elements of your reflection that you will submit with your finalized script in Module Five.

  • Applying Your Experience - Making mistakes when you learn to write code is common. It is part of learning. What is important is developing the skill of learning how to understand your errors and then fix them (debugging). For this part of your final project, you will respond to the following:
    • Reflecting on your experience with this activity, explain the importance of knowing how and when to use and modify variables, and using branches. Support your response with examples from the activity of the types of errors and your method for fixing them.

Rubric

Guidelines for Submission:

This is a draft of part of the final project. Complete the steps in Codio. Feedback will be provided by your instructor to incorporate in the final submission and the reflection document.

List

Identifies examples of four uses of list functions in the script using comments in your code

Dictionary

Identifies examples of four uses of dictionary functions using comments in your code

Loop

Identifies uses of loop functions using comments in your code

Script Comments

Code comments explain and facilitate navigation of the code

About

SNHU IT140 Final Project Script Two


Languages

Language:Python 100.0%