The ABC company has hired you as an intern on the coding team that creates e-commerce applications.
You must write a script that asks the user for a value. The value must be used as a whole number in a calculation, even if the user enters a decimal value.
You need to write the code to meet the requirements.
Which code segment should you use?
A . totalItems = input(“How many items would you like?”)
B . totalItems = float(input(“How many items would you like?”))
C . totalItems = str(input(“How many items would you like?”))
D . totalItems = int(input(“How many items would you like?”))
Answer: A
Explanation: http://www.informit.com/articles/article.aspx?p=2150451&seqNum=6
Latest 98-381 Dumps Valid Version with 40 Q&As
Latest And Valid Q&A | Instant Download | Once Fail, Full Refund