Scientific Computing Using Python - PHYS:4905
Python Homework #3
Due 9/5/2019
This assignment must be handed in electronically. You will
need to upload one file for each problem containing your Python code
as a text file. Please have the file name start with your last
name, e.g. smith.py. You can make the name longer if you like,
e.g. smith_hw3_1.py for the first problem and smith_hw3_2.py for the
second. I will grade the assignment by downloading your code
and running it, so you should be sure that it is complete and runs
correctly under Spyder.
1. (10) Write a Python program to play the simplified version of
Craps discussed in class. The program should keep rolling the
dice until you win or lose. The program should print out the
values of the two die for all the rolls. You will be graded on
the quality of your comments as well as that of your code.
This will be true for all future programming assignments in this
homework and all future assignments.
2. (10) Write a Python script to ask the user for an integer,
determine if it is a prime, and then inform the user.