質問編集履歴
1
コードにしました
test
CHANGED
File without changes
|
test
CHANGED
@@ -1,4 +1,8 @@
|
|
1
|
+
> ```ここに言語を入力
|
2
|
+
|
3
|
+
引用テキスト
|
4
|
+
|
1
|
-
#lab10
|
5
|
+
```#lab10
|
2
6
|
|
3
7
|
ls_day = ['Su', 'M', 'T', 'W', 'Th', 'F', 'Sa']
|
4
8
|
|
@@ -6,7 +10,7 @@
|
|
6
10
|
|
7
11
|
|
8
12
|
|
9
|
-
|
13
|
+
"""
|
10
14
|
|
11
15
|
start_day = input('Start day: ')
|
12
16
|
|
@@ -60,7 +64,63 @@
|
|
60
64
|
|
61
65
|
print()
|
62
66
|
|
67
|
+
"""```python
|
63
68
|
|
69
|
+
start_day = input('Start day: ')
|
70
|
+
|
71
|
+
|
72
|
+
|
73
|
+
|
74
|
+
|
75
|
+
for i in range(7): # 入力した曜日がリストの何番目にあるかを取得する処理
|
76
|
+
|
77
|
+
if ls_day[i] == start_day:
|
78
|
+
|
79
|
+
cnt = i
|
80
|
+
|
81
|
+
end = int(input('Last date: '))
|
82
|
+
|
83
|
+
|
84
|
+
|
85
|
+
|
86
|
+
|
87
|
+
i=1
|
88
|
+
|
89
|
+
**for day in ls_day:
|
90
|
+
|
91
|
+
print(day.ljust(3),end='')**
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
if cnt != 0:
|
96
|
+
|
97
|
+
print()
|
98
|
+
|
99
|
+
|
100
|
+
|
101
|
+
for c in range(cnt):
|
102
|
+
|
103
|
+
print(''.ljust(3),end='')
|
104
|
+
|
105
|
+
|
106
|
+
|
107
|
+
while(i<=end):
|
108
|
+
|
109
|
+
if cnt % 7 == 0:
|
110
|
+
|
111
|
+
print()
|
112
|
+
|
113
|
+
print(str(i).ljust(3),end='')
|
114
|
+
|
115
|
+
cnt+=1
|
116
|
+
|
117
|
+
i+=1
|
118
|
+
|
119
|
+
print()
|
120
|
+
|
121
|
+
コード
|
122
|
+
|
123
|
+
```
|
64
124
|
|
65
125
|
|
66
126
|
|