Python Code - Programming
Project 2: Grocery ListIntroductionYour 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 InputLoop through the grocery listProvide output to the consoleData StructureThe structure of the data for this project is extremely important.Each grocery item is a dictionary with the following key-value pairsa name of the grocery item with the key identifier namethe number of grocery items purchased with the key identifier numberthe cost of the grocery item with the key identifier price{name: milk, number: int(1), price: float(2.99)}grocery_history is a list of grocery item dictionary elements.The following is an example of initializing a list with items:grocery_history=[{name: milk, number: int(1), price: float(2.99)}, {name: eggs, number: 2, price: 3.99}, {name: onions, number: 4, price: 0.79}] Task: Create the empty data structureCreate an empty dictionary with the variable name grocery_itemCreate an empty grocery_history listControl StructureThe variable stop will be used with a while loop to check if the loop condition is true (and the loop will continue) or if the loop condition is false (and the loop will exit).In this script, the loop will end when the user enters ‘q’As the code in the while loop should run at least once, set the stop variable to anything other that q’, e.g. go or Truestop = goWrite a loop that will be used to collect user input.The While loop will use the stop variable to determine if the user has completed entering their grocery items.The following steps will all be completed if the loop condition is met (i.e., the user has not entered q):Accept input of the name of the grocery item purchased.Prompt: Item name:\nVariable: item_nameAccept input of the quantity of the grocery item purchased.Prompt: Quantity purchased:\nVariable: quantityAccept input of the cost of the grocery item input (this is a per-item cost).Prompt: Price per item:\nVariable: costCreate a dictionary entry in the loop which contains the name, number and price entered by the user. Assign the entry to a variable named grocery_itemThe format will be: {name:item_name, number: int(quantity), price: float(cost)}Add the grocery_item to the grocery_history list using the append functionPrompt the user for input asking if they have finished entering grocery items. Use the prompt:Would you like to enter another item?\nType c for continue or q to quit:\nLooping Through the ListIn this section, you will loop through the grocery_history list. For each item, you will:Print the number of that item purchasedPrint the name of the itemPrint the price paid for all of those items purchasedAdd this price to the grand total for the entire listYour results will look similar to this:2 apple @ $1.49 ea $2.98 1 milk @ $3.99 ea $3.99 Grand total: $6.97 Print the ListDefine variable to hold grand total called grand_totalDefine a for loop. This loop will examine each element in the grocery_history list.The loop will use the for in convention. Each grocery_history list element will be assigned to a variable named grocery_itemInside the for loop:Calculate the total cost for the grocery_item.The calculation is:item_total = number * priceAdd the item_total to the grand_totalOutput the information for the grocery item to match this example:Output →2apple@$1.49ea$2.98Variable →numbernamepriceitem_totalReminderYour can use the \%.2f formatting expression to format the dollar amountsSet the item_total equal to 0Finally, after printing all the items, print the grand total!The task is broken down into three sections.Section 1 - User InputSection 2 - loop through the grocery listSection 3 - provide output to the console#Task: Create the empty data structuregrocery_item = ?grocery_history = ?#Variable used to check if the while loop condition is metstop = gowhile ?????? : #Accept input of the name of the grocery item purchased. #Accept input of the quantity of the grocery item purchased. #Accept input of the cost of the grocery item input (this is a per-item cost). #Using the update function to create a dictionary entry which contains the name, number and price entered by the user. #Add the grocery_item to the grocery_history list using the append function #Accept input from the user asking if they have finished entering grocery items.# Define variable to hold grand total called grand_total#Define a for loop. for ??????? in ?????????: #Calculate the total cost for the grocery_item. #Add the item_total to the grand_total #Output the information for the grocery item to match this example: #2 apple @ $1.49 ea $2.98 #Set the item_total equal to 0#Print the grand total it_140_final_project_script_two_draft_guidelines_and_rubric.pdf Unformatted Attachment Preview IT 140 Final Project Script Two Draft Guidelines and Rubric Grocery List Script 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 is 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 Six. 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. In the Codio activity you will work on having your script do the following three things: 1. User Input 2. Loop through the grocery list 3. Provide output to the console After completing the activity, annotate the code. Specifically, your submission for the Grocery List script should address the following critical elements: I. 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. A. Create examples of four uses of list operations in the script in your code. Be sure your examples address each of the following: i. Creating lists ii. Adding and removing data from a list iii. Accessing values in a list iv. Modifying values in a list B. Create examples of dictionary operations in your code. Be sure your examples address each of the following: i. Creating dictionaries ii. Adding and removing key–value pairs iii. Accessing values using keys iv. Modifying values C. Create examples of loop structures in your code. Be sure your examples address each of the following: i. Item-based for loops ii. Index-based (range) for loops iii. While loops Rubric Guidelines for Submission: This is a draft of part of the final project. Complete the steps in Codio, then export and comment on the completed script. Once completed, submit the document with your commented code to Brightspace. Feedback will be provided by your instructor to incorporate in the final submission and the reflection document. Critical Elements List Dictionary Loop Script Comments Proficient (100\%) Needs Improvement (75\%) Not Evident (0\%) Value Creates examples of list functions in the script Creates examples of list functions in the script, but uses are inappropriate or inaccurate Does not create examples of list functions in the script 30 Creates examples of dictionary functions Creates examples of dictionary functions, but uses are inappropriate or inaccurate Does not create examples of dictionary functions 30 Creates examples of loop functions in the code Creates examples of loop functions, but uses are inappropriate or inaccurate Does not create examples of loop functions 30 Code is not fully annotated, or submission does not explain the code or does not facilitate navigation of your code 10 Code comments explain and Comments provide little assistance with facilitate navigation of the code understanding the code Total 100\% ... Purchase answer to see full attachment
CATEGORIES
Economics Nursing Applied Sciences Psychology Science Management Computer Science Human Resource Management Accounting Information Systems English Anatomy Operations Management Sociology Literature Education Business & Finance Marketing Engineering Statistics Biology Political Science Reading History Financial markets Philosophy Mathematics Law Criminal Architecture and Design Government Social Science World history Chemistry Humanities Business Finance Writing Programming Telecommunications Engineering Geography Physics Spanish ach e. Embedded Entrepreneurship f. Three Social Entrepreneurship Models g. Social-Founder Identity h. Micros-enterprise Development Outcomes Subset 2. Indigenous Entrepreneurship Approaches (Outside of Canada) a. Indigenous Australian Entrepreneurs Exami Calculus (people influence of  others) processes that you perceived occurs in this specific Institution Select one of the forms of stratification highlighted (focus on inter the intersectionalities  of these three) to reflect and analyze the potential ways these ( American history Pharmacology Ancient history . Also Numerical analysis Environmental science Electrical Engineering Precalculus Physiology Civil Engineering Electronic Engineering ness Horizons Algebra Geology Physical chemistry nt When considering both O lassrooms Civil Probability ions Identify a specific consumer product that you or your family have used for quite some time. This might be a branded smartphone (if you have used several versions over the years) or the court to consider in its deliberations. Locard’s exchange principle argues that during the commission of a crime Chemical Engineering Ecology aragraphs (meaning 25 sentences or more). Your assignment may be more than 5 paragraphs but not less. INSTRUCTIONS:  To access the FNU Online Library for journals and articles you can go the FNU library link here:  https://www.fnu.edu/library/ In order to n that draws upon the theoretical reading to explain and contextualize the design choices. Be sure to directly quote or paraphrase the reading ce to the vaccine. Your campaign must educate and inform the audience on the benefits but also create for safe and open dialogue. A key metric of your campaign will be the direct increase in numbers.  Key outcomes: The approach that you take must be clear Mechanical Engineering Organic chemistry Geometry nment Topic You will need to pick one topic for your project (5 pts) Literature search You will need to perform a literature search for your topic Geophysics you been involved with a company doing a redesign of business processes Communication on Customer Relations. Discuss how two-way communication on social media channels impacts businesses both positively and negatively. Provide any personal examples from your experience od pressure and hypertension via a community-wide intervention that targets the problem across the lifespan (i.e. includes all ages). Develop a community-wide intervention to reduce elevated blood pressure and hypertension in the State of Alabama that in in body of the report Conclusions References (8 References Minimum) *** Words count = 2000 words. *** In-Text Citations and References using Harvard style. *** In Task section I’ve chose (Economic issues in overseas contracting)" Electromagnetism w or quality improvement; it was just all part of good nursing care.  The goal for quality improvement is to monitor patient outcomes using statistics for comparison to standards of care for different diseases e a 1 to 2 slide Microsoft PowerPoint presentation on the different models of case management.  Include speaker notes... .....Describe three different models of case management. visual representations of information. They can include numbers SSAY ame workbook for all 3 milestones. You do not need to download a new copy for Milestones 2 or 3. When you submit Milestone 3 pages): Provide a description of an existing intervention in Canada making the appropriate buying decisions in an ethical and professional manner. Topic: Purchasing and Technology You read about blockchain ledger technology. Now do some additional research out on the Internet and share your URL with the rest of the class be aware of which features their competitors are opting to include so the product development teams can design similar or enhanced features to attract more of the market. The more unique low (The Top Health Industry Trends to Watch in 2015) to assist you with this discussion.         https://youtu.be/fRym_jyuBc0 Next year the $2.8 trillion U.S. healthcare industry will   finally begin to look and feel more like the rest of the business wo evidence-based primary care curriculum. Throughout your nurse practitioner program Vignette Understanding Gender Fluidity Providing Inclusive Quality Care Affirming Clinical Encounters Conclusion References Nurse Practitioner Knowledge Mechanics and word limit is unit as a guide only. The assessment may be re-attempted on two further occasions (maximum three attempts in total). All assessments must be resubmitted 3 days within receiving your unsatisfactory grade. You must clearly indicate “Re-su Trigonometry Article writing Other 5. June 29 After the components sending to the manufacturing house 1. In 1972 the Furman v. Georgia case resulted in a decision that would put action into motion. Furman was originally sentenced to death because of a murder he committed in Georgia but the court debated whether or not this was a violation of his 8th amend One of the first conflicts that would need to be investigated would be whether the human service professional followed the responsibility to client ethical standard.  While developing a relationship with client it is important to clarify that if danger or Ethical behavior is a critical topic in the workplace because the impact of it can make or break a business No matter which type of health care organization With a direct sale During the pandemic Computers are being used to monitor the spread of outbreaks in different areas of the world and with this record 3. Furman v. Georgia is a U.S Supreme Court case that resolves around the Eighth Amendments ban on cruel and unsual punishment in death penalty cases. The Furman v. Georgia case was based on Furman being convicted of murder in Georgia. Furman was caught i One major ethical conflict that may arise in my investigation is the Responsibility to Client in both Standard 3 and Standard 4 of the Ethical Standards for Human Service Professionals (2015).  Making sure we do not disclose information without consent ev 4. Identify two examples of real world problems that you have observed in your personal Summary & Evaluation: Reference & 188. Academic Search Ultimate Ethics We can mention at least one example of how the violation of ethical standards can be prevented. Many organizations promote ethical self-regulation by creating moral codes to help direct their business activities *DDB is used for the first three years For example The inbound logistics for William Instrument refer to purchase components from various electronic firms. During the purchase process William need to consider the quality and price of the components. In this case 4. A U.S. Supreme Court case known as Furman v. Georgia (1972) is a landmark case that involved Eighth Amendment’s ban of unusual and cruel punishment in death penalty cases (Furman v. Georgia (1972) With covid coming into place In my opinion with Not necessarily all home buyers are the same! When you choose to work with we buy ugly houses Baltimore & nationwide USA The ability to view ourselves from an unbiased perspective allows us to critically assess our personal strengths and weaknesses. This is an important step in the process of finding the right resources for our personal learning style. Ego and pride can be · By Day 1 of this week While you must form your answers to the questions below from our assigned reading material CliftonLarsonAllen LLP (2013) 5 The family dynamic is awkward at first since the most outgoing and straight forward person in the family in Linda Urien The most important benefit of my statistical analysis would be the accuracy with which I interpret the data. The greatest obstacle From a similar but larger point of view 4 In order to get the entire family to come back for another session I would suggest coming in on a day the restaurant is not open When seeking to identify a patient’s health condition After viewing the you tube videos on prayer Your paper must be at least two pages in length (not counting the title and reference pages) The word assimilate is negative to me. I believe everyone should learn about a country that they are going to live in. It doesnt mean that they have to believe that everything in America is better than where they came from. It means that they care enough Data collection Single Subject Chris is a social worker in a geriatric case management program located in a midsize Northeastern town. She has an MSW and is part of a team of case managers that likes to continuously improve on its practice. The team is currently using an I would start off with Linda on repeating her options for the child and going over what she is feeling with each option.  I would want to find out what she is afraid of.  I would avoid asking her any “why” questions because I want her to be in the here an Summarize the advantages and disadvantages of using an Internet site as means of collecting data for psychological research (Comp 2.1) 25.0\% Summarization of the advantages and disadvantages of using an Internet site as means of collecting data for psych Identify the type of research used in a chosen study Compose a 1 Optics effect relationship becomes more difficult—as the researcher cannot enact total control of another person even in an experimental environment. Social workers serve clients in highly complex real-world environments. Clients often implement recommended inte I think knowing more about you will allow you to be able to choose the right resources Be 4 pages in length soft MB-920 dumps review and documentation and high-quality listing pdf MB-920 braindumps also recommended and approved by Microsoft experts. The practical test g One thing you will need to do in college is learn how to find and use references. References support your ideas. College-level work must be supported by research. You are expected to do that for this paper. You will research Elaborate on any potential confounds or ethical concerns while participating in the psychological study 20.0\% Elaboration on any potential confounds or ethical concerns while participating in the psychological study is missing. Elaboration on any potenti 3 The first thing I would do in the family’s first session is develop a genogram of the family to get an idea of all the individuals who play a major role in Linda’s life. After establishing where each member is in relation to the family A Health in All Policies approach Note: The requirements outlined below correspond to the grading criteria in the scoring guide. At a minimum Chen Read Connecting Communities and Complexity: A Case Study in Creating the Conditions for Transformational Change Read Reflections on Cultural Humility Read A Basic Guide to ABCD Community Organizing Use the bolded black section and sub-section titles below to organize your paper. For each section Losinski forwarded the article on a priority basis to Mary Scott Losinksi wanted details on use of the ED at CGH. He asked the administrative resident