You are on page 1of 1

PH

509: Computational Physics



IIT Gandhinagar Fall 2017

Assignment 1
Due : Aug 7

Python Practice


1. In the python console : doing the following arithmetic
p
4
a. 29/5, 29.0/5, 2.5 , (24)

2. Import math library and calculate

a. x = /6, log(x) sin(x), cos(x), tanh(x)

3. Write a simple python script to compute to convert temperature from Centigrade to
Fahrenheit. (Your raw input should be temperature in Celsius and output should be
in Fahrenheit) Execute the program

4. Write a python script to get First name, last name , Address line 1, Address line 2,
City , State , Pin code and Phone number. Your output should display address in a
nice format



Sympy exercises

1. Expand sin(x) and tanh(x) to order 16
2. Get help on integrate, and integrate the following functions
x*sin(ax) (where a is another symbolic variable
x**6*sin(x) , with x=0 to 2*pi
exp(-x**2)

You might also like