# ---
# jupyter:
#   jupytext:
#     text_representation:
#       extension: .py
#       format_name: light
#       format_version: '1.5'
#       jupytext_version: 1.14.4
#   kernelspec:
#     display_name: Python 3
#     language: python
#     name: python3
# ---

#Import the necessary library
import numpy as np

#Manually add the Summer Olympics, London 2012 dataset as arrays
countries = np.array(['Great Britain','China', 'Russia', 'United States', 'Korea', 'Japan', 'Germany'])
gold = np.array([29,38,24,46,13,7,11])
silver = np.array([17,28,25,28,8,14,11])
Bronze = np.array([19,22,32,29,7,17,14])

#Find the country name with maximum gold medals
max_gold = np.argmax(gold)
name_of_country_with_max_gold = countries[max_gold]
print(name_of_country_with_max_gold)

#Find the countries with more than 20 gold medals
print(countries[gold>20])

#Evaluate the dataset and print the name of each country with its gold medals and total number of medals
for i in range(len(countries)):
    print("Name of the country: {} with gold medals: {} and total medals: {}".format(countries[i], gold[i],np.add(gold,silver,Bronze)[i]))



StarcoderdataJupyterScriptsDedupFiltered