Welcome to the ASS-G - Assignment Repository. The assignments will be posted here implement. Successfully completing an assignment implies proper conceptual understanding.
✅ Send a pull request only after completing an assignment.
✅ Please submit PRs (Pull Requests) after completion of every assignment.
✅ Please follow this PR Template while submitting assignments
✅ Please read through the FAQ before proceeding with the assignment.
✅ Please follow proper file structure else the PR would be rejected
✅ Keep fetching the repository from here as we instruct so that you'd receive all assignments in time
One assignment for every week. Scroll down to take a look at them. All you need to do is fork this repository, complete the given assignment, send a pull request over to us and repeat the process for every assignment. Check out our FAQ for more information.
-
Problem
- Write your first python program
hello_world.py
and upload it to our Assignment Repository using Git. ⚠️ Follow the file structure properly as instructed here else the Pull request will be automatically rejected.
- Write your first python program
-
Expected Output
py hello_world.py > Hello World!
-
Resources
-
Still stuck?
⚠️ Try doing the assignment by yourself before proceeding.- Video describing how to submit the pull request
-
Problem 1 (robberThief.py)
-
Given an amount robbed by a thief ,who’s aim was to rob more than 20,000, classify the profit of the thief as following:
- Loss if he has robbed less than
5000
- Moderate if it is between
5000
to19999
- Good theft if more than
20000
- Loss if he has robbed less than
-
Sample Input
Enter the amount robbed by the thief: 9500
- Sample Output
Profit is Moderate
-
-
Problem 2 (occurances.py)
-
Print the characters in a string along with the number of occurances of those characters.
-
Sample Input
Enter the String: aabbccddee
-
Sample Output
Occurances: a -> 2 b -> 2 c -> 2 d -> 2 e -> 2
-
-
Problem 3 (attendanceStudents.py)
-
The details of students and their respective attendance details are given below. Using the concepts of lists and Strings in Python. Print the names of the students who were present
-
The name and their Attendance statuses are separated by "-"
-
P
stands for Present whileA
stands for AbsentRam-P Malar-A Ahuja-P Vijay-P Harini-A
-
Sample Input
Enter your String: Leena-P Steve-A Dinesh-P Pragya-P
-
Sample Output
The present students were: Leena Dinesh Pragya
-
-
Resources
Just submit it once you're done an assignment.
If you are new to Git or GitHub, check out this small tutorial.
Our code ninjas are hard at work preparing the rest of the problems. Don't worry, they'll be up soon.
We have a folder for each assignment. Simply create a folder with your registration_number
, complete your code and move the file into that folder.
Some examples:
If your registration_number
is 180501XXX submitting assignment Y
then:
- Go to the folder
assignment Y
- Create a folder
180501XXX
insideassignment Y
- Upload your code in the path
assignment Y\\180501XXX
🚫 Please do not modify any existing files in the repository.
I forked the repository but some problems were added only after that. How do I access those problems?
Not to worry! Open your nearest terminal or command prompt and navigate over to your forked repository. Enter these commands:
git remote add upstream https://github.com/ASS-G/Batch-1-Assignments.git
git fetch upstream
git merge upstream/master
If you're curious, the commands simply add a new remote called upstream that is linked to this repository. Then it 'fetches' or retrieves the contents of the repository and attempts to merge it with your progress. Note that if you've already added the upstream repository, you don't need to re-add it in the future while fetching the newer questions.
This shouldn't happen unless you modify an existing file in the repository. There's a lot of potential troubleshooting that might be needed, but the simplest thing to do is to make a copy of your code outside the repository and then clone it once again. Now repeat the steps from the answer above. Merge it and then add your code. Now proceed as usual. :)
Contact one of the board members or open up an issue on this repository and we'll do our best to help you out.