Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
学ぶ Handle More Challenging Math in Python | First Acquaintance with Python
Introduction to Python (dev copy) (copy) 1769011330820
セクション 1.  4
single

single

bookHandle More Challenging Math in Python

メニューを表示するにはスワイプしてください

Python provides several additional math operations.

1234567891011
# Default division print(18 / 4) # Floor division print(18 // 4) # Remainder of the division print(18 % 4) # Raising to the power of 4 print(18 ** 4)
copy

Why Are These Operations Helpful?

Imagine you have $50 and want to buy as many cookie packs as possible, with each pack costing $6. To determine how many packs you can buy and how much money will remain, you can use these operations:

  • 50 // 6 gives 8, meaning you can buy 8 packs.
  • 50 % 6 results in 2, meaning you’ll have $2 left after the purchase.
タスク

スワイプしてコーディングを開始

  1. On the second line, compute the floor division of 234 by 32.
  2. On the fifth line, determine the remainder when 356 is divided by 17.

解答

Switch to desktop実践的な練習のためにデスクトップに切り替える下記のオプションのいずれかを利用して、現在の場所から続行する
すべて明確でしたか?

どのように改善できますか?

フィードバックありがとうございます!

セクション 1.  4
single

single

AIに質問する

expand

AIに質問する

ChatGPT

何でも質問するか、提案された質問の1つを試してチャットを始めてください

some-alt