exam questions

Exam 350-401 All Questions

View all questions & answers for the 350-401 exam

Exam 350-401 topic 1 question 779 discussion

Actual exam question from Cisco's 350-401
Question #: 779
Topic #: 1
[All 350-401 Questions]

What does the statement print(format(0.8, '.0%')) display?

  • A. 8.8%
  • B. .08%
  • C. 8%
  • D. 80%
Show Suggested Answer Hide Answer
Suggested Answer: D 🗳️

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
due
Highly Voted 1 year, 8 months ago
Selected Answer: D
The statement print(format(0.8, '.2%')) will display the value 0.8 as a percentage with a precision of 2 decimal places, resulting in the output '80.00%'.
upvoted 7 times
...
NetworkJanitor
Most Recent 5 months ago
Selected Answer: D
It's D. Proof: online-python.com: print(format(0.8, '.0%')) = 80% In fact, similar to what "due" stated, it the numbers on the right dictate the output. So, if you put print(format(0.8, '.5%')), that is still 80.00000% or 80% of course.
upvoted 1 times
NetworkJanitor
5 months ago
Quick add as the "format" is the function: format(0.8, '.0%') converts 0.8 to a percentage (80%) and rounds it to the nearest whole number. hth
upvoted 1 times
...
...
agabeen
6 months, 3 weeks ago
D is correct. after reading the comments you say Ahaaa, that makes sense -_-
upvoted 1 times
...
[Removed]
10 months, 2 weeks ago
Selected Answer: D
D is correct. after reading the comments you say Ahaaa, that makes sense -_- 0.8 * 100 = 80
upvoted 1 times
...
[Removed]
11 months ago
D is correct. after reading the comments you say Ahaaa, that makes sense -_-
upvoted 2 times
...
slacker_at_work
1 year, 1 month ago
Selected Answer: D
If you only want the percentage to be displayed as '8%' without any decimals, you would need to use a different formatting specification, such as '0%'. With this specification, 0.8 would be displayed as '8%'.
upvoted 1 times
...
Colmenarez
1 year, 8 months ago
Selected Answer: D
Option D, 80%
upvoted 4 times
...
alex711
1 year, 8 months ago
Selected Answer: D
Provided answer is correct
upvoted 3 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