Error message when writing example code

Hi I have bought a new arduino but whenever I try to write code to it I get this message

Arduino: 1.6.11 (Mac OS X), Board: "Arduino/Genuino Uno"

Sketch uses 1,848 bytes (5%) of program storage space. Maximum is 32,256 bytes.
Global variables use 186 bytes (9%) of dynamic memory, leaving 1,862 bytes for local variables. Maximum is 2,048 bytes.
avrdude: ser_open(): can't open device "COM1": No such file or directory
ioctl("TIOCMGET"): Inappropriate ioctl for device
Problem uploading to board. See http://www.arduino.cc/en/Guide/Troubleshooting#upload for suggestions.

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

Thanks in advance

Select the port corresponding to your Arduino from the tools -> port menu