exam questions

Exam 98-381 All Questions

View all questions & answers for the 98-381 exam

Exam 98-381 topic 1 question 29 discussion

Actual exam question from Microsoft's 98-381
Question #: 29
Topic #: 1
[All 98-381 Questions]

You develop a Python application for your company.
You need to accept input from the user and print that information to the user screen.
You have started with the following code. Line numbers are included for reference only.

Which code should you write at line 02?

  • A. name = input
  • B. input("name")
  • C. input(name)
  • D. name = input()
Show Suggested Answer Hide Answer
Suggested Answer: B 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
s_balla_in
Highly Voted 5 years, 4 months ago
The correct answer would be name=input() print("what is your name?") name=input() print(name)
upvoted 33 times
...
Washiedread
Highly Voted 5 years, 1 month ago
name=input() looks correct
upvoted 12 times
...
SP_RSA
Most Recent 2 years, 6 months ago
Selected Answer: D
#assign name variable to input object name = input() #user to input name print(name) #print the user input
upvoted 1 times
...
nameless1997
2 years, 11 months ago
Selected Answer: D
its D because that's the only one that works
upvoted 1 times
...
Sureshpmath
3 years, 8 months ago
Yes answer should be D
upvoted 1 times
...
Mist3
3 years, 11 months ago
Correct answer is D (name = input())
upvoted 3 times
...
shtingdcknipples
4 years, 1 month ago
It is D
upvoted 2 times
...
sagacious_smith
4 years, 2 months ago
it should be D
upvoted 2 times
...
Viki2405
4 years, 6 months ago
Answer is D
upvoted 4 times
...
pythonista
4 years, 9 months ago
Answer is D
upvoted 4 times
...
JeffJupiter
4 years, 10 months ago
Answer is D, not error when running code in choice D
upvoted 4 times
...
syeda_bano
4 years, 10 months ago
Option D looks correct but I runned the program on online IDE it gives an error on all four options...
upvoted 2 times
...
Krish3197
4 years, 12 months ago
D is correct
upvoted 9 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago