exam questions

Exam 350-401 All Questions

View all questions & answers for the 350-401 exam

Exam 350-401 topic 1 question 357 discussion

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

Refer to the exhibit.

Which result does the Python code achieve?

  • A. The code encrypts a base64 decrypted password.
  • B. The code converts time to the Epoch LINUX time format.
  • C. The code converts time to the "year/month/day" time format.
  • D. The code converts time to the yyyymmdd representation.
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
[Removed]
Highly Voted 1 year, 6 months ago
Selected Answer: D
I'm very green when it comes to this programming stuff, so I had to sit for a bit and really dig down to grasp the concept. For those like me or not: YEAR = 2022 * 10000 = 20220000 MONTH = 01 * 100 = 100 DAY = 09 PRINT 20220000 + 100 + 09 ---------------------------- 20220109 = YYYYMMDD
upvoted 17 times
...
myhdtv6
Highly Voted 1 year, 5 months ago
Guys listen to me if you feel that makes sense if you don't have a Programming knowledge and wants to solve this for the sake of exam. see the very last line in question "date=str(......)" there is + + + in btwn and outside the bracket there is a string string is a not a number (integer), string could be anything , like a word or alphabets or characters, and remember, whenever there is a string and you see + + +, THAT SIMPLY MEANS IT WILL MAKE THE WHOLE WORD SIT TOGTHER WITH EACH OTHER WITHOUT DOING ANY "ADDTITION", + + + IS TO COMBINE THE THE LETTERS OR WHATEVER IS GIVEN, NOT TO EXECUTE ADDITION NOW CHECK THE OPTIONS... D. has YYYYMMDD, means combination of String and + make it sit together. I hope it is understandable
upvoted 9 times
...
[Removed]
Most Recent 7 months ago
Selected Answer: D
D is correct
upvoted 1 times
...
shefo1
1 year ago
Selected Answer: D
easy explain for three lines : It decodes a base64-encoded string, removes newline characters, gets the current date, and then creates a string representation of the date in the format "yyyymmdd". Therefore, the correct answer is: D.
upvoted 1 times
...
abcdabcd666
1 year, 4 months ago
This code is disgusting
upvoted 6 times
...
[Removed]
2 years, 8 months ago
Selected Answer: D
D is valid answer
upvoted 1 times
...
ElJetiIngeniero
2 years, 9 months ago
Selected Answer: D
Tried this in python, answer is D
upvoted 1 times
...
aohashi
2 years, 9 months ago
Selected Answer: D
It should be D
upvoted 1 times
...
pacman64
2 years, 11 months ago
Selected Answer: D
print(str(10000*d.year + 100*d.month + d.day)) 20220109
upvoted 7 times
Labedu_Singh
2 years, 10 months ago
>>> import datetime >>> d = datetime.date.today() >>> print(d) 2022-02-17 >>> print(str(10000*d.year + 100*d.month + d.day)) 20220217 >>>
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 ...