subject

You work in a pawn shop that gets in shipments of jewelry. Each shipment is kept in a file (see below for a sample file) and contains the type of jewelry, the stone in the piece of jewelry and whether it is real or fake. Create a function that prints to screen certain information about the shipment and returns the number of a specific number of items (based on the arguments-see sample runs) File: jewelry1.txt ring diamond real necklace diamond real ring sapphire fake bracelet ruby fake bracelet diamond fake Sample runs: printf("%d\n",get_available_items(" jewelry1.txt","stone")); (base) Computers-MacBook Air! computers .la. out I see that -stone- is important in this shipment. Any specific stone to count? diamond OK. I will keep count of the number of the following that I find: diamond --diamond print out all stones --diamond - - Sapphire --ruby --diamond -ruby returns 3 since there are 4 diamonds printf("%d\n",get_available_items(" jewelry1.txt", "type")); (base) Computers-MacBook Air:C computers ./a. out I see that -type- is important in this shipment Any specific type to count? ring Ok. I will keep count of the number of the following that I find: ring ring print out all types --necklace -ring --bracelet --bracelet --ring 3 returns 3 since there are 3 rings printf("%d\n",get_available items("jewelry1.txt", "authentic")); (base) Computers - MacBook Air:C computers .la. out I see that -authentic. is important in this shipment. Any specific authentic to count? fake Ok. I will keep count of the number of the following that I find: fake - real print out all real/fake - real - fake - fake --fake fake returns 4 since there are 4 fakes printf("%d\n",get_available_items(" jewelry1.txt","cookie")); (base) Computers-MacBook Air:C computers ./a. out Unknown parameter to check...-1 you have to pass one of the following: type. Stone, authentic

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 03:10
This program reads a file called 'test.txt'. you are required to write two functions that build a wordlist out of all of the words found in the file and print all of the unique words found in the file. remove punctuations using 'string.punctuation' and 'strip()' before adding words to the wordlist. write a function build_wordlist() that takes a 'file pointer' as an argument and reads the contents, builds the wordlist after removing punctuations, and then returns the wordlist. another function find_unique() will take this wordlist as a parameter and return another wordlist comprising of all unique words found in the wordlist. example: contents of 'test.txt': test file another line in the test file output: ['another', 'file', 'in', 'line', 'test', 'the']
Answers: 1
question
Computers and Technology, 22.06.2019 22:00
During physical science class ben and jerry connected three identical lightbulbs in parallel to a battery where happens when ben removes one of the lightbulbs from it’s socket
Answers: 2
question
Computers and Technology, 22.06.2019 23:00
Suppose s, t, and w are strings that have already been created inside main. write a statement or statements, to be added to main, that will determine if the lengths of the three strings are in order by length, smallest to largest. that is, your code should determine if s is strictly shorter than t, and if t is strictly shorter than w. if these conditions hold your code should print (the boolean value) true. if not, your code should print false. (strictly means: no ties) example: if s, t, and w are "cat", "hats", and "skies" your code should print true - their lengths are 3-4-5; but if s, t, and w are "cats" "shirt", and "trust", then print false - their lengths are 4-5-5 enter your code in the box below
Answers: 2
question
Computers and Technology, 22.06.2019 23:30
Jaina and tomas are being considered as new tenants in an apartment. the landlord looks at their creditworthiness because he wants to be sure his new tenant pays the rent on time and in full. the table below summarizes the information that was on their applications. application information questions jaina tomas how many years have you had your job? 5 2 what is your monthly salary? $1,850 $2,500 how many credit cards do you have? 4 1 how much debt do you have? $13,000 $7,000 how many times were you late with payments on credit cards in the past year? 5 1 who will the landlord decide to be more creditworthy and why? tomas because the ratio of his debt to income is less. jaina because she has had her job longer, which makes her look more stable. jaina because she has more credit cards available to her. tomas because he makes more money per month.
Answers: 2
You know the right answer?
You work in a pawn shop that gets in shipments of jewelry. Each shipment is kept in a file (see belo...
Questions
question
Mathematics, 01.03.2021 06:50
question
Mathematics, 01.03.2021 06:50
question
Social Studies, 01.03.2021 06:50
question
Mathematics, 01.03.2021 06:50
Questions on the website: 13722359