Introduction to Cosmic Inflation and Dark Energy