Hi everyone. I’m excited to hear about how you’re using this book and how it’s working out for you. If you have questions or comments, post them here!
Hi, Is it possible to prompt a user to input name in swift programming in playground?
Unfortunately, Swift Playgrounds do not support user input from what I can tell.
You’ll need to instead create a new command line application and use Swift to prompt for input that way.
Most of the exercises in this book require user input.
A quick Google search should show you how to prompt for input in Swift. I found a few ways when I just looked, although I am not at all an expert with Swift.
When I made this program, I actually built the UI with a text field and a button, and wired things up that way. I learned a lot about how to build graphical iOS apps that way.
I bought your book pretty much when it came out, but I’ve been sitting on it since, and just recently started working through it to learn Python. (I’m an old hand at Perl, but the world has moved on from Perl in many places.) I’ve been kind of amazed at how many introductory Python books don’t have exercises… “type in this code and I’ll explain it to you” isn’t at all the same as “solve this problem with what you’ve learned so far” and solving problems is where a language really sinks in for me.
I’m really enjoying this book. Because I’m not proficient in Python yet, I can’t really solve problems at work with it (we still work in Perl as well as Python, and trying to work in Python really slows me down), and I don’t have any personal projects to work on (and personal projects rarely start with simple concepts and work toward complex in an orderly fashion), so a set exercises simply for the sake of practice is just what I needed.
I’m only up to problem 10, but this is clearly what all the Python books I’ve looked at are missing. I really find it interesting that you deal with problems that many books gloss over… like how poorly languages can deal with floating point numbers, and that you need to be aware of them.
Thanks for taking the time to pursue publishing. I have already recommended this book to others with the caveat of, “I haven’t actually tried it.” But now it goes very strongly in my list of recommendations with, “I found it very helpful.”