Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions week_1/DSC_python_assignment/DiagonalName.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
from colorama import Fore,Style
sp=""
s=input("Please Enter your name: ")
for i in range(len(s)):
for j in range (i+1):
print(Fore.LIGHTMAGENTA_EX+sp+s[i])
sp+=" "
break
print (Style.RESET_ALL)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions week_1/DSC_python_assignment/SongLyrics.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import time
song="Kabhi kaali ratiyaa kabhi din suhaane, Kismat ki baate toh kismat hi jaane, O beta ji, O beta ji, Are! o baabu ji, Kismat ki hawa kabhi naram, kabhi garam, Kabhi naram-naram kabhi garam-garam, Kabhi naram-garam naram-garam, O beta ji, Kismat ki hawa kabhi naram, kabhi garam Kabhi naram-naram kabhi garam-garam, Kabhi naram-garam naram-garam, O beta ji"
s=song.split(", ")
for i in range(len(s)):
print(s[i])
time.sleep(1)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
31 changes: 31 additions & 0 deletions week_1/DSC_python_assignment/StudentRecord.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# student1_roll_num=input("Enter Roll Number Of First Student")
# student1_name=input("Enter Name Of First Student")
# student2_roll_num=input("Enter Roll Number Of Second Student")
# student2_name=input("Enter Name Of Second Student")
# student3_roll_num=input("Enter Roll Number Of Third Student")
# student3_name=input("Enter Name Of Third Student")
# student4_roll_num=input("Enter Roll Number Of Fourth Student")
# student4_name=input("Enter Name Of Fourth Student")
# student5_roll_num=input("Enter Roll Number Of Fifth Student")
# student5_name=input("Enter Name Of Fifth Student")
Student_Record={
1:[input("Enter Roll Number Of First Student: "),input("Enter Name Of First Student: "),input("Enter Age Of First Student: "),input("Enter Marks Of First Student: ")],
2:[input("Enter Roll Number Of Second Student: "),input("Enter Name Of Second Student: "),input("Enter Age Of Second Student: "),input("Enter Marks Of Second Student: ")],
3:[input("Enter Roll Number Of Third Student: "),input("Enter Name Of Third Student: "),input("Enter Age Of Third Student: "),input("Enter Marks Of Third Student: ")],
4:[input("Enter Roll Number Of Fourth Student: "),input("Enter Name Of Fourth Student: "),input("Enter Age Of Fourth Student: "),input("Enter Marks Of Fourth Student: ")],
5:[input("Enter Roll Number Of Fifth Student: "),input("Enter Name Of Fifth Student: "),input("Enter Age Of Fifth Student: "),input("Enter Marks Of Fifth Student: ")]

}
if int(Student_Record[1][3])>100 or int(Student_Record[2][3])>100 or int(Student_Record[3][3])>100 or int(Student_Record[4][3])>100 or int(Student_Record[5][3])>100:
print("Kindly print marks out of 100")
else:
max_mark=max(Student_Record[1][3],Student_Record[2][3],Student_Record[3][3],Student_Record[4][3],Student_Record[5][3])
min_mark=min(Student_Record[1][3],Student_Record[2][3],Student_Record[3][3],Student_Record[4][3],Student_Record[5][3])
sum_mark=int(Student_Record[1][3])+int(Student_Record[2][3])+int(Student_Record[3][3])+int(Student_Record[4][3])+int(Student_Record[5][3])
print ("{:<10} {:<10} {:<10} {:<10}".format('Roll_No', 'Name', 'Age','Marks'))
for key, value in Student_Record.items():
Roll_No, Name, Age, Marks = value
print ("{:<10} {:<10} {:<10} {:<10}".format(Roll_No, Name, Age, Marks))
print("CLASS MAXIMUM MARKS: "+max_mark)
print("CLASS MINIMUM MARKS: "+min_mark)
print("CLASS AVERAGE MARKS: ",sum_mark/len(Student_Record))
5 changes: 5 additions & 0 deletions week_1/readme.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# DSC-DSU | Python Bootcamp 2020 | Week 1

Paste questions and brief writeup here

in the first program i have read every charachter. i have assumed every position as in matrix and then print every char in their respective positions such as charat(0) at (0,0), charat(1) at (1,1) and so on on their respective positions. PLus for some styling i have, from colorama import Fore,Style. In the second program, i have created a dictionary of lists and by running through loop i have printed every value in the table in the third program using split function, first i spilited whole song in small fragment putting them in list and then looping over each index to print them.Plus used time.sleep function to delay the execution of each line.
https://github.com/saif-byte/Python-Bootcamp-DSC-DSU/blob/main/week_1/DSC_python_assignment/DiagonalName%20output.PNG
https://github.com/saif-byte/Python-Bootcamp-DSC-DSU/blob/main/week_1/DSC_python_assignment/SongLyrics%20output.PNG
https://github.com/saif-byte/Python-Bootcamp-DSC-DSU/blob/main/week_1/DSC_python_assignment/Student%20Record%20output.PNG