質問編集履歴

6

2020/09/04 06:02

投稿

fleur_0206
fleur_0206

スコア2

test CHANGED
File without changes
test CHANGED
@@ -37,3 +37,7 @@
37
37
  print ("Pay : ", pay)
38
38
 
39
39
  ```
40
+
41
+ 【追記】
42
+
43
+ ご指摘ありがとうございます。質問を修正いたしましたので、ご確認いただければ幸いです。

5

2020/09/04 06:02

投稿

fleur_0206
fleur_0206

スコア2

test CHANGED
File without changes
test CHANGED
@@ -1,38 +1,12 @@
1
- プログラミング初心者です。Pythonを学び始めたのですが、週計算のコードの書き方がわりません。ご教示いただけますと幸いです。
1
+ プログラミング初心者です。Pythonを学び始めたのですが、週の売上を計算するコードを記述したいですが、どのようなコードを書いたら良いのか分からないのでご教示いただけますと幸いです。問題としては、時給10ドルで週40時間働いた場合、その週の売上を算出出来るコードを教えていただきたいです。
2
2
 
3
3
 
4
4
 
5
- 問題文はらです。
5
+ また、週給計算のコードを自分なりに書いてみたのですが、初めてコードを書いたのでどか誤りがあったご指摘いただければ幸いです。
6
6
 
7
7
 
8
8
 
9
- Write a Python program to compute the weekly pay for a salesman.
10
-
11
- Your program will prompt the user for the hourly pay rate, the number of hours worked that week, and the week's sales.
12
-
13
- 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.
14
-
15
- The commission should be computed as a percentage of the weekly sales.
16
-
17
- You choose the value for the percentage. Use a variable.
18
-
19
- Your program should output the pay, the commission, and the total pay for the week.
20
-
21
-
22
-
23
- 営業マンの週給を計算する Python プログラムを書いてください。
24
-
25
- あなたのプログラムは、時間給のレート、その週に働いた時間数、その週の売上をユーザーに要求します。
26
-
27
- プログラムは、給与(働いた時間数に時給をかけたもの)とコミッションの合計として給与総額を計算します。
28
-
29
- コミッションは週の売上のパーセンテージとして計算さるべきです。
9
+ 説明が下手で申し訳ありませんがご教示いただけば幸いです。
30
-
31
- あなたがパーセンテージの値を選択します。変数を使用します。
32
-
33
- あなたのプログラムは、賃金、コミッション、および週の合計賃金を出力する必要があります。
34
-
35
-
36
10
 
37
11
 
38
12
 
@@ -40,11 +14,11 @@
40
14
 
41
15
  ```Python
42
16
 
43
- To compute the weekly pay for a salesman
17
+ #To compute the weekly pay for a salesman
44
18
 
45
19
 
46
20
 
47
- Prompt the user for the hours worked and hourly rate
21
+ #Prompt the user for the hours worked and hourly rate
48
22
 
49
23
 
50
24
 

4

2020/09/04 05:59

投稿

fleur_0206
fleur_0206

スコア2

test CHANGED
File without changes
test CHANGED
@@ -1,4 +1,4 @@
1
- プログラミング初心者です。Pythonを学び始めたのですが、週給計算のコードの書き方がわかりません。どのようなコードを書いたら良いのか分からないのでご教示いただけますと幸いです。
1
+ プログラミング初心者です。Pythonを学び始めたのですが、週給計算のコードの書き方がわかりません。ご教示いただけますと幸いです。
2
2
 
3
3
 
4
4
 

3

2020/09/03 18:37

投稿

fleur_0206
fleur_0206

スコア2

test CHANGED
File without changes
test CHANGED
@@ -48,9 +48,9 @@
48
48
 
49
49
 
50
50
 
51
- hours=eval (input ("Enter Hours: "))
51
+ hours = eval (input ("Enter Hours: "))
52
52
 
53
- rate=eval (input ("Enter Rate: "))
53
+ rate = eval (input ("Enter Rate: "))
54
54
 
55
55
 
56
56
 

2

2020/09/03 18:36

投稿

fleur_0206
fleur_0206

スコア2

test CHANGED
File without changes
test CHANGED
@@ -38,9 +38,7 @@
38
38
 
39
39
  こちらが自分で書いたコードです。
40
40
 
41
-
42
-
43
- ``````Python
41
+ ```Python
44
42
 
45
43
  #To compute the weekly pay for a salesman
46
44
 
@@ -64,4 +62,4 @@
64
62
 
65
63
  print ("Pay : ", pay)
66
64
 
67
- ``
65
+ ```

1

2020/09/03 18:35

投稿

fleur_0206
fleur_0206

スコア2

test CHANGED
File without changes
test CHANGED
@@ -40,7 +40,9 @@
40
40
 
41
41
 
42
42
 
43
+ ``````Python
44
+
43
- ```#To compute the weekly pay for a salesman
45
+ #To compute the weekly pay for a salesman
44
46
 
45
47
 
46
48
 
@@ -60,4 +62,6 @@
60
62
 
61
63
  pay = hours * rate
62
64
 
63
- print ("Pay : ", pay)```
65
+ print ("Pay : ", pay)
66
+
67
+ ``