readLine() is not taking input in swift Xcode

Hello iFamily,

I've been trying to use readLine() function in my program, which is always returning "nil" value and not able to provide the input from the console.

Please find the attached screenshot.

It is not allowing me enter any value as input from console.

Please let me know how to fix this ASAP.

Wanted to learn Swift language , but this is stopping me to proceed further.

let nop = readLine()----> giving nil directly unable to enter any input

Regards,
Samanth Sai
Are you using the Swift Playgrounds app? Or a playground within Xcode?

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"
readLine() is not taking input in swift Xcode
 
 
Q