1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
mario62 [17]
3 years ago
12

Define the summary function, which takes as arguments a database (dict) and a dict of current stock prices. It returns a diction

ary (dict or defaultdict) whose keys are client names (str) whose associated values are 2-tuples: the first index is a dictionary (dict or defaultdict) whose keys are stock names (str) and values are the number of shares (int) the client owns. The second index is the amount of money (int) the portfolio is worth (the sum of the number of shares of each stock multiplied by its current price). Assume each client starts with no shares of any stocks, and if a client owns 0 shares of a stock, the stock should not appear in the client’s dictionary. Recall positive numbers are a purchase of the stock and negative numbers a sale of the stock. E.g., if db is the database above, calling summary(db, {'IBM':65, 'Intel':60, 'Dell':55, 'Apple':70}) would return
Computers and Technology
1 answer:
lozanna [386]3 years ago
5 0
Hi :). (_define Your question to answer) ,
You might be interested in
What does the hard disk drive do?
Airida [17]
It stores data and retrieving digital information using one or more rigid rapidly rotating disks (platters) coated in magnetic material
4 0
4 years ago
Read 2 more answers
Write a Java program to accept an item's name and price from the user and output them to the console
Anit [1.1K]

Answer:

// program in java.

// package

import java.util.*;

// class definition

class Main

{// main method of the class

public static void main (String[] args) throws java.lang.Exception

{

   try{

    // scanner object to read inputs

Scanner scr=new Scanner(System.in);

 // variables

String name;

   double price;

   System.out.print("Enter item's name: ");

   // read item's name

   name = scr.next();

   System.out.print("Enter item's price: ");

   // read item's price

   price= scr.nextDouble();

   // print name

   System.out.println("name of item is:"+name);

   // print price

   System.out.println("price of item is:"+price);

   }catch(Exception ex){

       return;}

}

}

Explanation:

Read name & price of item from user and assign it to variables "name" & "price" respectively with scanner object.Then print the name and price of item .

Output:

Enter item's name: Apple                                                                                                  

Enter item's price: 100                                                                                                    

name of item is:Apple                                                                                                      

price of item is:100.0

6 0
3 years ago
A group of students take hundreds of digital photos for a science project about weather patterns. Each photo file contains data
lesya [120]

Analyzing the metadata would be more appropriate than analyzing the data when: determining the likelihood that the photo was taken at a particular public event.

<h3>What is a data?</h3>

A data can be defined as a representation of instructions or information in a formalized manner, especially as a series of binary digits (bits).

<h3>What is a metadata?</h3>

A metadata can be defined as the data that provides information about one or more aspects of a given data, so as to provide a structured reference that helps to sort and identify all of its attributes such as:

  • Author
  • Date created
  • Date modified
  • File type
  • File size

In this scenario, analyzing the metadata would be more appropriate than analyzing the data when determining the likelihood that the photo was taken or created at a particular public event.

Read more on data here: brainly.com/question/25558534

6 0
2 years ago
What is the advantage of breaking your application’s code into several small procedures?
Sholpan [36]

Answer: For better code management and modularity

Explanation:

An application consist several lines of code so when we break an entire code into several small procedures it becomes easy to maintain and look for errors while debugging. This process also is part of good code writing and hence easy to manage our code during testing and debugging phases of application development.

3 0
3 years ago
Which Display Ad format should you use if you're concerned about malware and want a secure ad experience across platforms?
Dennis_Churaev [7]

Answer:

"AMPHTML ads" is the correct answer for the above question.

Explanation:

  • The "AMPHTML" is used for secure ads, which is written in the form of AMP HTML.
  • It is a lighter and faster ad that has the features of doing the ads securely.
  • It is safe from the virus because it is verified by the software while transferring on the internet.
  • The above question asked about the display which can be used for secure ads. Then the ads are an "AMPHTML" which is described above.
3 0
3 years ago
Other questions:
  • Buildings must be wired to comply with the latest National Electrical Code to ensure that, with adequate maintenance, the instal
    11·1 answer
  • Answer the following questions which are based on the study "Patients' Engagement with Sweet Talk." Submit your answers to the e
    9·1 answer
  • What type of device does a computer turn to first when attempting to make contact with a host with a known IP address on another
    9·2 answers
  • Write a program with total change amount as an integer input that outputs the change using the fewest coins, one coin type per l
    14·1 answer
  • Create a Divisible application that displays a random integer between 1 and 100 and displays appropriate messages stating whethe
    5·1 answer
  • Can someone tell me what this means Higfaa
    6·1 answer
  • A computer reads a sequence from top to bottom and left to right.
    13·1 answer
  • Which of the following statements is true about the code used for software development?
    7·1 answer
  • A(n) __________ is a common list operation used in programming. Its purpose is to iterate through a list of items, one item at a
    8·1 answer
  • Task 03
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!