Assignment 2b: Triangle

Write a program Triangle that meets the following specifications:

The program asks the user for an angle in degrees.

The program asks the user for another angle in degrees.

The program calculates the third angle of a triangle with the first two angles, and prints out that value for the user.

A good program:

Provides clear instructions to the user.

Provides clear feedback to the user.

You can make this program even better using one or more conditionals.  Some angles won’t make any sense, and won’t form an actual triangle.  In this case you could give the user feedback such as:

“Those two angles don’t make a triangle.”

Getting numbers from the user:

When you use get_string(), you get a string.  If you want to ask the user her name, use get_string().

There are two kinds of numbers python recognizes.  Integers and floats.

When you want an integer, use get_int().  Integers are for things you can count.

Floats are numbers that can (but don’t have to) have a decimal part.  To get a float from the user, use get_float().  If you’re even in doubt about whether something should be an int or a float, just ask if the thing could be 5.5.  If yes, then use a float.