+ 1

Please can someone explain user input I'm a novice with programming language

25th Jun 2019, 12:58 PM
Ijale
5 Réponses
+ 2
User input means input provided by the user who is using the program or software. For example if you want to create a program that stores data related to user then the data provided by user is more reliable than entered randomly. So in that case you will need to use user input in program. User input can be entered as follow: In Python, name = input("Enter your Name") print(name) in C, char name[20]; scanf("%s",&name); printf("%s",name) in Java, Scanner input = new Scanner(System.in): String name = input.nextLine(); System.out.println(name)
25th Jun 2019, 1:06 PM
Deepak Kumar
Deepak Kumar - avatar
+ 1
The input function returns a string, including the input the user gave. It has 1 argument, and it prints it on the screen. Example: inp = input("Enter something: ") print(inp) # input is: this is an input # output: # Enter something: this is an input
25th Jun 2019, 1:02 PM
Airree
Airree - avatar
+ 1
What about a case where you specify what language you want the answer in
25th Jun 2019, 1:05 PM
Airree
Airree - avatar
+ 1
25th Jun 2019, 1:41 PM
Daljeet Singh
Daljeet Singh - avatar
0
What about a case where scanner is used
25th Jun 2019, 1:05 PM
Ijale