CPSC120A
Fundamentals of Computer Science I

Post-lab 4

Errors & Debugging

In this post-lab you will demonstrate problem solving by writing a simple Python program.

Details

Create a Python program that prints the number of handshakes it would take for every student in a classroom to shake hands with every other student. Assume that there are 28 students in the classroom. This program should use arithmetic operations to perform the calculations necessary. Use variables where appropriate, and follow the course's code conventions.

Example

$ python3 handshakes.py
It would take 378 handshakes for all 28 students to meet each other.

Challenge

There are roughly 1,869 students on the Roanoke campus. That's a pretty big number, but relatively small compared to other schools. If every student tried to shake every other students' hand, how many handshakes would that be? Add code to your program to caclulate and print the result.

Submission

Submit your program as a .py file on the course Inquire page before class on Monday September 8th.