Expand mobile version menu

Artificial Intelligence Specialist

Real-Life Activities

Real-Life Math

Even artificial intelligence specialists have to learn the basics of programming. "As programming is one of my primary duties," says computer programmer Krys Wallbank, "math is very important in my day-to-day work."

You are an artificial intelligence specialist who wants to center a dialog box on a client's computer screen based on the height and width of the screen. The width of a computer screen (resolution) is usually 1,024 pixels. The height is usually 768 pixels.

The form (the dialog box) we want to display on the screen is a constant 500 pixels wide by 500 high, and we want it to be centered on the screen regardless of what the user's computer screen resolution is set to. The programmer must first determine the height of the screen and the width of the screen in order to set the dialog box in the center. For argument's sake, assume that the screen is running in 1024 x 768 mode. Can you figure out the screen coordinates in order to center the dialog box on the screen?