Skip to content

Instantly share code, notes, and snippets.

@Harshjain007
Created June 16, 2020 10:11
Show Gist options
  • Save Harshjain007/0f0267fb8d7f77a04609fd4742874114 to your computer and use it in GitHub Desktop.
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.
name = input("Enter your name")
print('Hello',name)
@19mis0010
Copy link

name = input("Enter your name")
print('Hello',name)

@Areeba1709
Copy link

sarah

@Sakshi097
Copy link

sakshi

@Mouneesha777
Copy link

Please send me the program

@lalithaalekhya
Copy link

Send the program

@AmirAleem
Copy link

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