CertyRush
Đang tải...
C CertyRush
Câu hỏi free preview

Câu 11: 98-381: Introduction to Programming Using Python

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…

Nội dung câu hỏi

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?

Các lựa chọn

Đáp án được giữ gọn theo nhãn A, B, C, D trong phần bình chọn tương tác.

  1. A. totalItems = input("How many items would you like?")
  2. B. totalItems = float(input("How many items would you like?"))
  3. C. totalItems = str(input("How many items would you like?"))
  4. D. totalItems = int(input("How many items would you like?")) — đáp án hiện tại

Cộng đồng

0 bình luận công khai. Tên thành viên được ẩn một phần.

Chưa có bình luận. Mở giao diện tương tác để bắt đầu thảo luận.

Câu hỏi liền kề