<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described below step by step
<END_TASK>
<USER_TASK:>
Description:
 Data Bootcamp
Step1:  IPython review
We review some of the basics of IPython.  You won't be asked about IPython on the exam, but since the exam is an IPython notebook, it's essential for you to be able to work with one. 
Question 1.  
How do you set/choose the current cell?  
How do you edit the current cell?  
How do you add a new cell below the current cell?  
How do you specify the current cell as code or text?  
How do you delete the current cell?  
How do you move the current cell up or down?  
How do you run the current cell?  
Add your name in bold to the bottom of the first cell in this notebook.  Bonus
Step2:  Question 3. These get progressively more difficult
<ASSISTANT_TASK:>
Python Code:
# import packages 
import pandas as pd                   # data management
import matplotlib.pyplot as plt       # graphics 
# IPython command, puts plots in notebook 
%matplotlib inline
# check Python version 
import datetime as dt 
import sys
print('Today is', dt.date.today())
print('What version of Python are we running? \n', sys.version, sep='') 
Explanation: Data Bootcamp:  Exam practice & review
We review the material we've covered to date:  Python fundamentals, data input with Pandas, and graphics with Matplotlib. Questions marked Bonus are more difficult and are there to give the experts something to do.   
This IPython notebook was created by Dave Backus, Chase Coleman, and Spencer Lyon for the NYU Stern course Data Bootcamp.  
This version was modified by (add your name in bold here).  And add your initials to the notebook's name at the top.  
Preliminaries
Import packages and check the date.
End of explanation
# code cell for experimenting 
Explanation: IPython review
We review some of the basics of IPython.  You won't be asked about IPython on the exam, but since the exam is an IPython notebook, it's essential for you to be able to work with one. 
Question 1.  
How do you set/choose the current cell?  
How do you edit the current cell?  
How do you add a new cell below the current cell?  
How do you specify the current cell as code or text?  
How do you delete the current cell?  
How do you move the current cell up or down?  
How do you run the current cell?  
Add your name in bold to the bottom of the first cell in this notebook.  Bonus: Add a link to your LinkedIn or Facebook page.  
How do you save the contents of your notebook?  
Answers.  Enter your answers below:  
Python fundamentals
Question 2. Describe the type and content of these expressions:   
x = 2 
y = 3.0
z = "3.0"
x/y
letters = 'abcd'
letters[-1]
xyz = [x, y, z]
xyz[1]
abcd = list(letters)
abcd[-2]
case = {'a': 'A', 'b': 'B', 'c': 'C'} 
case['c'] 
2 &gt;= 1
x == 2 
Answers. Enter your answers below:
End of explanation
# if that failed, you can generate the same data with   
data = {'ARG': [137.5, 106.0, 61.8, 47.0, 39.1, 37.3, 48.6], 
        'DEU': [59.2, 64.6, 66.3, 64.9, 80.3, 79.0, 73.1],   
        'GRC': [98.1, 94.9, 102.9, 108.8, 145.7, 156.5, 177.2],
        'Year': [2002, 2004, 2006, 2008, 2010, 2012, 2014]}  
debt = pd.DataFrame(data)
Explanation: Question 3. These get progressively more difficult:  
What type is dollars = '$1,234.5'?
Find and apply a method that eliminates the dollar sign from dollars. 
Find and apply a method that eliminates the comma from dollars. 
Eliminate both the dollar sign and comma from dollars and covert the result to a float.
Combine the last three steps in one line.  
In each case, create a code cell that delivers the answer. Please write the question number in a comment in each cell.
Question 4. 
For this problem we set letters = 'abcd' as in problem 2.  
Find and apply a method that converts the lower case letter 'a' to the upper case letter 'A'.  
Write a loop that goes through the elements of letters and prints their upper case versions.
Bonus: Write a loop that goes through the elements of letters.  On each interation, print a string consisting of the upper and lower case versions together; eg, 'Aa'.  
In each case, create a code cell that delivers the answer. Please write the question number in a comment in each cell.
Question 5.
For this problem xyz is the same as defined in problem 2
Write a loop that goes through the elements of xyz and prints them.
Modify the loop to print both the elements of xyz and their type.  
Modify the loop to print only those elements that are not strings. 
In each case, create a code cell that delivers the answer. Please write the question number in a comment in each cell. 
Data input with Pandas
We explore the public indebtedness of Argentina (country code ARG), Germany (DEU), and Greece (GRC).  For each one, we provide the ratio of government debt to GDP for every second year starting in 2002.  The data come from the IMF's World Economic Outlook.
Question 6. Write code in the cell below that reads the csv file we posted at
http://pages.stern.nyu.edu/~dbackus/Data/debt.csv 
Assign the contents of the file to the object debt.  
The rest of the questions in this notebook will refer to the object debt you create below.
End of explanation
<END_TASK>