There are a number of choices here. If you want a serious target gun, neither one qualifies. If you want a real target gun, consider the Ruger MKIII or the S&W Model 41. Each can easily take a scope base and attach a scope of your choice.
If you are more interested in an informal target gun, a plinker, then the Beretta may work, but the Ruger may be more difficult to scope than you want. If you want a Ruger Single Six with a scope, consider the Single Six Hunter. It is available in .22 and 17 cal, with dual cylinders, and it comes with a barrel scope mount system.