|
| 1 | +# Types of Data |
| 2 | + |
| 3 | +# 1. Qualitative Data: "Data Associated with the quality in different categories" |
| 4 | + |
| 5 | +# (a). Ordinal Data |
| 6 | + |
| 7 | +marks=int(input("Enter your percentage")) |
| 8 | + |
| 9 | +if(marks<=40): |
| 10 | + print("Fail") |
| 11 | +elif((marks>40)&(marks<=50)): |
| 12 | + print("Second Class") |
| 13 | +elif((marks>50)&(marks<=60)): |
| 14 | + print("First Class") |
| 15 | +elif(marks>=60): |
| 16 | + print("Congratulations!! You got distinction") |
| 17 | + |
| 18 | +# ["Girls and boys are differentiated based on the answer given by them.] |
| 19 | + |
| 20 | + |
| 21 | +# (b). Nominal Data |
| 22 | + |
| 23 | +ans1=input("Would you like to go for shopping? if yes then type Y / y else N/n") |
| 24 | +ans2=input("Do you love talking on any topic? if yes then type Y / y else N/n") |
| 25 | + |
| 26 | +if(((ans1=='Y')|(ans1=='y'))&((ans2=='Y')|(ans2=='y'))): |
| 27 | + print("Welcome to girls club") |
| 28 | +else: |
| 29 | + print("Sorry boys, you can not join the club") |
| 30 | + |
| 31 | +# ["Grade are given to students according to their score on the exam"] |
| 32 | + |
| 33 | + |
| 34 | +#------------------------------------------------------------------------------------------- |
| 35 | + |
| 36 | +# 2. Qantitative Data : "Data associated with Quantity which can be measured" |
| 37 | + |
| 38 | +# (a). Discrete Data : Product_List(in fixed quantity) |
| 39 | + |
| 40 | +Product_List = {"Samsung":500, "Apple":30, "Nokia":10, "LG":450, "Sony":200} |
| 41 | +print(Product_List) |
| 42 | + |
| 43 | + |
| 44 | +# (b). Continuous Data = Weight of Patients(in Kg) |
| 45 | +Patients_Weight = {"P_ID001":86.5, "P_ID002":91.3, "P_ID003":45.8, "P_ID004":78.2, "P_ID005":80.3} |
| 46 | +print(Patients_Weight) |
0 commit comments