Created
June 16, 2020 10:11
-
-
Save Harshjain007/0f0267fb8d7f77a04609fd4742874114 to your computer and use it in GitHub Desktop.
2.2 Write a program that uses input to prompt a user for their name and then welcomes them. Note that input will pop up a dialog box. Enter Sarah in the pop-up box when you are prompted so your output will match the desired output.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name = input("Enter your name") | |
print('Hello',name) |
sarah
sakshi
Please send me the program
Send the program
Write a program to take user input and store username
in a variable. If the username contains any special symbol
among [@ . , !], prompt the user to enter a valid username.
For character codes of [@ .
Note:
ASCII code of ! is 33
ASCII code of , is 44
ASCII code of . is 46
ASCII code of @ is 64
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
name = input("Enter your name")
print('Hello',name)