0% found this document useful (0 votes)
41 views1 page

PH 509: Computational Physics: IIT Gandhinagar Fall 2017 Assignment 1

This document contains instructions for Assignment 1 in the Computational Physics course PH 509 at IIT Gandhinagar for Fall 2017. It includes exercises to practice basic Python arithmetic, importing math functions, writing scripts to convert between Celsius and Fahrenheit temperatures and collect address information. It also includes exercises using Sympy to expand trigonometric functions as Taylor series, get help on integration, and integrate some example functions.

Uploaded by

Gourav Thakur
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
41 views1 page

PH 509: Computational Physics: IIT Gandhinagar Fall 2017 Assignment 1

This document contains instructions for Assignment 1 in the Computational Physics course PH 509 at IIT Gandhinagar for Fall 2017. It includes exercises to practice basic Python arithmetic, importing math functions, writing scripts to convert between Celsius and Fahrenheit temperatures and collect address information. It also includes exercises using Sympy to expand trigonometric functions as Taylor series, get help on integration, and integrate some example functions.

Uploaded by

Gourav Thakur
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 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