swift - Random Number Generator (Command Line) -
when user enters number have guess random number. these errors getting line of code in code twice. "value of type "string has no number "stringbyreplacingoccruencesofstring" input = input.stringbyreplacingoccurrencesofstring("\n", withsring:"", here full code import foundation var randomnumber = 1 var userguess:int? = 1 var continueguessing = true var keepplaying = true var input = "" while (keepplaying) { randomnumber = int(arc4random_uniform(101)) // gets random number between 0- 1000 print("the random number guess is:\(randomnumber)"); while (continueguessing) { print ("print number between 0 , 100") input = nsstring(data: filehandle.standardinput.availabledata, encoding:string.encoding.utf8.rawvalue) as! string // gets keyboard input input = input.stringbyreplacingoccurrencesofstring("\n", withsring:"", options: nsstring.compareoptions.literalsearch, range...