質問編集履歴
6
title
CHANGED
File without changes
|
body
CHANGED
@@ -17,4 +17,6 @@
|
|
17
17
|
|
18
18
|
pay = hours * rate
|
19
19
|
print ("Pay : ", pay)
|
20
|
-
```
|
20
|
+
```
|
21
|
+
【追記】
|
22
|
+
ご指摘ありがとうございます。質問を修正いたしましたので、ご確認いただければ幸いです。
|
5
title
CHANGED
File without changes
|
body
CHANGED
@@ -1,27 +1,14 @@
|
|
1
|
-
プログラミング初心者です。Pythonを学び始めたのですが、週
|
1
|
+
プログラミング初心者です。Pythonを学び始めたのですが、週の売上を計算するコードを記述したいのですが、どのようなコードを書いたら良いのか分からないのでご教示いただけますと幸いです。問題としては、時給10ドルで週40時間働いた場合、その週の売上を算出出来るコードを教えていただきたいです。
|
2
2
|
|
3
|
-
|
3
|
+
また、週給計算のコードを自分なりに書いてみたのですが、初めてコードを書いたのでどこか誤りがあったらご指摘いただければ幸いです。
|
4
4
|
|
5
|
-
Write a Python program to compute the weekly pay for a salesman.
|
6
|
-
Your program will prompt the user for the hourly pay rate, the number of hours worked that week, and the week's sales.
|
7
|
-
Your program should compute the total pay as the sum of the pay (based on the number of hours worked times the hourly rate) and the commission.
|
8
|
-
The commission should be computed as a percentage of the weekly sales.
|
9
|
-
|
5
|
+
説明が下手で申し訳ありませんが、ご教示いただければ幸いです。
|
10
|
-
Your program should output the pay, the commission, and the total pay for the week.
|
11
6
|
|
12
|
-
営業マンの週給を計算する Python プログラムを書いてください。
|
13
|
-
あなたのプログラムは、時間給のレート、その週に働いた時間数、その週の売上をユーザーに要求します。
|
14
|
-
プログラムは、給与(働いた時間数に時給をかけたもの)とコミッションの合計として給与総額を計算します。
|
15
|
-
コミッションは、週の売上のパーセンテージとして計算されるべきです。
|
16
|
-
あなたがパーセンテージの値を選択します。変数を使用します。
|
17
|
-
あなたのプログラムは、賃金、コミッション、および週の合計賃金を出力する必要があります。
|
18
|
-
|
19
|
-
|
20
7
|
こちらが自分で書いたコードです。
|
21
8
|
```Python
|
22
|
-
|
9
|
+
#To compute the weekly pay for a salesman
|
23
10
|
|
24
|
-
|
11
|
+
#Prompt the user for the hours worked and hourly rate
|
25
12
|
|
26
13
|
hours = eval (input ("Enter Hours: "))
|
27
14
|
rate = eval (input ("Enter Rate: "))
|
4
title
CHANGED
File without changes
|
body
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
プログラミング初心者です。Pythonを学び始めたのですが、週給計算のコードの書き方がわかりません。
|
1
|
+
プログラミング初心者です。Pythonを学び始めたのですが、週給計算のコードの書き方がわかりません。ご教示いただけますと幸いです。
|
2
2
|
|
3
3
|
問題文はこちらです。
|
4
4
|
|
3
title
CHANGED
File without changes
|
body
CHANGED
@@ -23,8 +23,8 @@
|
|
23
23
|
|
24
24
|
#Prompt the user for the hours worked and hourly rate
|
25
25
|
|
26
|
-
hours=eval (input ("Enter Hours: "))
|
26
|
+
hours = eval (input ("Enter Hours: "))
|
27
|
-
rate=eval (input ("Enter Rate: "))
|
27
|
+
rate = eval (input ("Enter Rate: "))
|
28
28
|
|
29
29
|
#Compute and display the total pay
|
30
30
|
|
2
title
CHANGED
File without changes
|
body
CHANGED
@@ -18,8 +18,7 @@
|
|
18
18
|
|
19
19
|
|
20
20
|
こちらが自分で書いたコードです。
|
21
|
-
|
22
|
-
```
|
21
|
+
```Python
|
23
22
|
#To compute the weekly pay for a salesman
|
24
23
|
|
25
24
|
#Prompt the user for the hours worked and hourly rate
|
@@ -31,4 +30,4 @@
|
|
31
30
|
|
32
31
|
pay = hours * rate
|
33
32
|
print ("Pay : ", pay)
|
34
|
-
``
|
33
|
+
```
|
1
title
CHANGED
File without changes
|
body
CHANGED
@@ -19,7 +19,8 @@
|
|
19
19
|
|
20
20
|
こちらが自分で書いたコードです。
|
21
21
|
|
22
|
+
``````Python
|
22
|
-
|
23
|
+
#To compute the weekly pay for a salesman
|
23
24
|
|
24
25
|
#Prompt the user for the hours worked and hourly rate
|
25
26
|
|
@@ -29,4 +30,5 @@
|
|
29
30
|
#Compute and display the total pay
|
30
31
|
|
31
32
|
pay = hours * rate
|
32
|
-
print ("Pay : ", pay)
|
33
|
+
print ("Pay : ", pay)
|
34
|
+
``
|