-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathproje_1.py
More file actions
36 lines (31 loc) · 910 Bytes
/
proje_1.py
File metadata and controls
36 lines (31 loc) · 910 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import pandas as pd
import numpy
from pandas import ExcelWriter
a =numpy.arange(2)
w=ExcelWriter('list.xlsx')
df_list =[]
ders = input("Ders Adı: ")
for i in a:
ad= input("Öğrenci Adı: ")
soyad=input("Öğrenci Soyadı: ")
no = input("Öğrenci No: ")
puan = int(input("Öğrenci Puanı: "))
def harf(puan):
if puan >= 85 and puan <=100:
return 'A-Geçti'
elif puan >=65 and puan <=84:
return 'B-Geçti'
elif puan >=50 and puan<=64:
return 'C-Geçti'
else:
return 'F-Kaldı'
sonuc=harf(puan)
df = pd.DataFrame({'Ad': [ad],
'Soyad': [soyad],
'No': [no],
'Puan':[puan],
'Sonuç':[sonuc]})
df_list.append(df)
for i, df in enumerate(df_list):
df.to_excel(w,sheet_name='Sheet'+ str(i))
w.save()