BasicFiles & CSV10 points

Big baskets by country

An international e-commerce shop wants to know how much money comes from big baskets in each market. Orders live in orders.csv (first half of 2025).

  • order_id: unique order code
  • country: customer country
  • category: product category
  • units: number of items (whole number)
  • unit_price: price of one item in USD (whole number)
  • order_date: YYYY-MM-DD

Task: the first input line is a country (exactly as in the file), the second line is an integer min_units. An order counts when its country matches and units is at least min_units. Print two lines: Orders: N and Revenue: X, where revenue is the sum of units x unit_price over the counted orders, written with 2 decimals (for example Revenue: 1234.00).

Files your program can read

orders.csv241 lines
order_id,country,category,units,unit_price,order_date
O-10001,Mexico,Toys,1,46,2025-02-05
O-10002,Brazil,Toys,12,40,2025-03-31
O-10003,United Kingdom,Toys,3,46,2025-06-17
O-10004,Mexico,Books,3,24,2025-05-17
O-10005,Canada,Electronics,2,278,2025-02-25
O-10006,India,Books,8,21,2025-04-15
O-10007,India,Books,5,22,2025-01-24
...

Open them by name, for example open("orders.csv").

Sample test

Input

Germany
6

Expected output

Orders: 21
Revenue: 18053.00

Your answer is also checked against 4 hidden tests.