The Challenge Your task is to input a string, and output the number of spaces in the string. This is Code Golf, so least number of bytes win. Test Cases "test" => 0 "Hello, World!" => 1 "C O D E G O L F" => 7 " " => 6
challenge
-
-
June 14, 2020I’m sure that you’ve all seen those crazy videos on YouTube of dogs being left alone in their homes with a GoPro camera attached to them. They invariably end up getting into all kinds of mischief while their owners are away. And of course, the dog gives a, “I didn’t do it…” look that always melts their humans’ hearts. GoPro, Inc. themselves is one of those hugely successful companies that were borne out of a simple idea from a completely unrelated event. A guy by the name of Nick Woodman (hmm, Digital Batman’s alter ego’s name is Nick) back in 2002 was out surfing one day in Australia. He was hoping to capture some awesome action photos while riding the waves but was unable to because no amateur photographer had neither the affordable equipment nor the experience to get close enough for the really good shots. So was borne the idea of a high resolution, incredibly compact, and easy‐to‐use camera that could go anywhere and take any kind of action shot—and eventually action video. Not only have GoPro’s have been put on mischievous dogs but they’ve been everywhere from attached to flying drones getting impossible aerial shots (now used in motion picture productions), to spelunking and sky diving, and even into space—as one little girl did a few years ago onboard a Hello Kitty‐crewed rocket (see the Best of them All vid to the right)! This company has grown incredibly fast since 2002 and sports a huge line of products that have literally transformed the digital photography and videography landscapes! We’re building solutions that enable people to capture and share life experiences…and as a result GoPro is growing virally via content creation and sharing. ~ Nick Woodman, CEO of GoPro, inc. GoPro, Inc. received the Technology Emmy for 2013 from...
-
January 20, 2020When writing fun stuff for my company’s global communications site, sometimes I like to throw in a brainteaser every now and again—especially given that a lot of PTC’s employees and customers are engineers. So here are two geometry puzzles to get those old mental juices flowing! 64 = 65 Geometry Paradox Where does the hole in second triangle come from (the partitions are the same)? Write Numbers Write the numbers from 1 to 8 into the squares, so that the squares with consecutive numbers do not touch (neither edges nor corners). These and other amazing geometry puzzles can be found here on BrianDen.com.
-
October 14, 2019How many squares are in this image? But here’s the twist: you have to present your logic behind the answer.