Can anyone tell me what is wrong with my work ? I’m confused why doesn’t nam come out as Sarah.
nam = input()
input() function ask data form user, once you run the above a new window will pop up, whatever(this time Sarah) you enter, that will be printed in the output.
Ah I got it! Thank you Abhijit, your explanation is much better than the video, I’ve been watched it many times still couldn’t figure it out, I guess that’s the downside of online learning.
Thank you for the complement...
ABHIJIT is correct! input() will create a window for the user to enter whatever they want. If you do not want the user to enter, and if you want to just put Sarah in the code yourself then doing this would also work:
nam = ‘Sara’
ah , there is another way ! Thanks Hakki.
There are so many ways to do the same thing using computer science.
I would like to talk to you... Please reach me via whatsapp at +918200713617
Already have an account? Login
Enter your username or e-mail address. We'll send you an e-mail with instructions to reset your password.
Sorry, we're still checking this file's contents to make sure it's safe to download. Please try again in a few minutes.
Sorry, our virus scanner detected that this file isn't safe to download.
We use 3 different kinds of cookies. You can choose which cookies you want to accept. We need basic cookies to make this site work, therefore these are the minimum you can select. Learn more about our cookies.
Coursera provides universal access to the world’s best education, partnering with top universities and organizations to offer courses online.
© 2020 Coursera Inc. All rights reserved.