String Formating¶
- 
    
Assume you have a variable
xthat refers to an integer. Write code to print out the value of x surrounded by arrows. E.g., if the value of x is 7, you should print this:-->7<--Use%das the specifier in the format string. 
- 
    Given two integers
v1andv2, use string formatting to create a stringvaluesshowing the values ofv1andv2with a ‘, ‘ between (a comma and a space).Make sure you put your values in a tuple. 
- 
    If
v1= 1,v2= 3.75, andv3= “hi”, create a string in variableresStrwith valuehi! 1 != 3.75 :-(.Put your three values in a tuple in the orderv3,v1,v2. To make sure you have only 2 digits after the decimal, use this format specifier:%.2f 
- 
    If
v1= 1, andv2= 2, create a string in variableresStrwhich refers tovariable 1 is 1 (1.0) and variable 2 is 2 (2.0).To make sure you have only 1 digit after the decimal, use this format specifier:
%.1fYou can use a variable multiple times in the same tuple.