Bắt đầu ngayBắt đầu miễn phí

Printing

When working with scripts, print statements can help you see the output of your code. You can use one or more print statements in the same script, and everything inside the statements will be printed to the console.

You are working on the same script from the previous exercise to track your weekly working hours. Now you want to add printing to see the output of your total hours worked this month.

Bài tập này là một phần của khóa học

Introduction to Julia

Xem khóa học

Hướng dẫn bài tập

  • Print the number of weeks worked this month, which is 4.
  • Print the sum of hours worked each week, which is 39 + 37.5 + 40 + 42.

Bài tập tương tác thực hành trực tiếp

Hãy thử làm bài tập này bằng cách hoàn thành đoạn mã mẫu này.

# Hours worked this week

# Print the number of weeks worked
____

# Print the sum of the hours worked each week
____
Chỉnh sửa và Chạy Mã