Re: Untitled

From Ungracious Owl, 5 Months ago, written in Python, viewed 121 times. This paste is a reply to Untitled from Polina - view diff
URL http://codebin.org/view/6aab5d84 Embed
Download Paste or View Raw
  1. import numpy as np
  2. import pandas as pd
  3.  
  4. services = ['Минуты', 'СМС', 'Мбайты']
  5. packs_names = ['«За рулём»', '«В метро»']
  6. packs = np.array([
  7.     [20, 5],
  8.     [2, 5],
  9.     [500, 1000]])
  10.  
  11. clients_packs = np.array([
  12.     [1, 2],
  13.     [2, 3],
  14.     [4, 1],
  15.     [2, 3],
  16.     [5, 0]])
  17.  
  18. client = 1
  19. print('Пакеты клиента')
  20. print(pd.DataFrame(clients_packs[client], index=packs_names, columns=['']))
  21. print()
  22.  
  23. client_vector = clients_packs[0, :] # < напишите код здесь >
  24. client_services = np.dot(packs, client_vector)  # < напишите код здесь >
  25.  
  26. print("Минуты, СМС, Мбайты")
  27. print(client_services)

Reply to "Re: Untitled"

Here you can reply to the paste above