The paper investigates the applicability of machine learning (ML) to weather prediction by building a low-resolution ML model for global weather prediction. The forecast performance of the ML model is assessed by comparing it to that of persistence and a numerical physics-based model, whose prognostic state variables and resolution are identical to those of the ML model. The ML model typically provides realistic prediction of the weather for the entire globe for about five forecast days. For the first three forecast days, the ML model outperforms persistence in the extratropics. While the relative performance of the ML model compared to the physics-based model is mixed, the ML forecasts are more accurate for the specific humidity in the extratropics and the specific humidity and temperature in the tropics. These results suggests that ML has a potential to improve the prediction of state variables most affected by parameterized processes in numerical models.