During the course of this workshop, Prakamya Singh (Head of Web Dev) will guide you through the basics of
programming with Python.
On Day 1 we will be explaining what programming is about, with the inclusion of some pseudocode examples.
We will explain variables and different data types, and show how they are used in programming.
We will also look at different operations and operators used in programming, such as arithmetic and logical
operators.
Then we will look at some programming constructs including loops and conditionals, and input and output.
Finally, we will end the day by showing how to install and set up Python 3.10 and Visual Studio Code,
and we will teach some basic terminal commands that will be necessary for the rest of the workshop.
On Day 2, we will begin with our first programs in python, featuring some basic input and output.
We will then look at the possible data types in python, and show how to assign values to variables.
We will also look at the different operations, and how they are used in python.
We will end the day by learning about loops and conditions in python, and a live solution of a sample problem
that will use all the topics covered in the day so far.
Day 3 will be the final day of the learning phase, and during this day we will look at how to define functions,
and how to create our own datatypes in python with the help of classes.
Then we will go in-depth on strings and arrays(called lists in python), showing how they work, and we will show
some useful methods that can allow the manipulation of strings and lists.
We will also take a look at dictionaries in python, and show their versatility in handling paired or grouped
data.
Finally, we will look at how modules in python work, and we will demonstrate the use of certain modules, and we
will even see how to make our own custom modules.
We will end the session with another sample problem, that will use everything that we have learnt so far.
On Day 4, the challenge problem for the workshop will be released, after a one hour (optional) doubt-clearance
session.
For the next two days, the participants will be solving the challenge problem, and the submissions for the
problem will open on day 5.
The 10 best submissions(graded according to the criteria below) will get certificates of excellence!
Hand Cricket!!!
Requirements:
User vs. Comp
1 wicket match
No tie/draw, only win or lose(if you don't reach the target, you lose)
“Odd or Eve” toss - take 2 numbers, add them and see if it is odd or even
Ex: I call odd, toss is 3+6=9, 9 is odd so I win the toss
Accept “o”, “odd”, “eve”, “even” or “e” for toss; ignore capitalization
Accept only "bat" or "bowl" for opting to bat/bowl; ignore capitalization
Have to opt to bat or bowl(depending on who wins toss)
Runs are only from 1 to 6; no dot balls, wide, no balls etc.
After 1st innings, print out the target
At the end of the match, print out the winner
Code requirements:
Must have at least 1 function of your own
Must use at least 2 modules
Must use at least 1 loop(while or for) and 1 conditional
Must use at least 3 f-strings
Must tell what is going on(tell when toss is happening, proper input prompts, tell when each innings is etc.)
Coloured output:
If the player wins the toss, print it in green. If the computer won the toss, print it in red
The target should be printed out in a color of your choice(except red and green)
If the player wins, print in green. If the computer wins, print in red
If there is a wicket, print "THATS OUT!!!" in red text
Don't understand? Look at one of the demo videos on the discord server! If you haven't joined it yet, join it now!
-----FOR BONUS CHALLENGE ONLY-----
Hand Cricket 2.0
Requirements:
User vs. Comp
Whoever loses the toss can choose the number of wickets(from 1 to 10 only)
Store every batsman's score to show in a scorecard
Output a scorecard at the end of the match like this: "Batsman 1: 30" "Batsman 2: 21" etc.
For someone who score 50+, show them in green in the scorecard
At the fall of each wicket, print the team score with wickets fallen like "THATS OUT!!! 45 for 3"
Highlight changes in blue(when showing that 1st innings has started, showing that toss is happening, showing a caption for the scorecard/result etc.)
Code requirements:
Must have at least 1 function of your own
Must use at least 2 modules
Must use at least 1 loop(while or for) and 1 conditional
Must use at least 3 f-strings and a list
Must tell what is going on(tell when toss is happening, proper input prompts, tell when each innings is etc.)
Coloured output:
Same as before, but with a small addition
Show batsman and bowler in different colours of your choice(except green and red)
Like this: Batsman: 3 Bowler: 5
Don't understand? Look at one of the demo videos on the discord server! If you haven't joined it yet, join it now!
All timings in SGT
23rd March (Wednesday): Day 1 - 12:00 to 2:30 pm teaching
24th March (Thursday): Day 2 - 12:00 to 2:30 pm teaching
25th March (Friday): Day 3 - 12:00 to 2:30 pm teaching
26th March (Saturday): Day 4 - 12:00 to 1:00 pm doubt clearance
26th March (Saturday): Day 4 - 3:00 pm challenge problem released
27th March (Sunday): Day 5 - 6:00 pm submissions opened
28th March (Monday): 12:00 pm deadline for submissions
Grading criteria for submissions
Validity of submission
The code must be submitted in the right category(of course) and before the deadline. The code
must also perform all the required functions as specified in the problem statements.
Code efficiency
We will not be recording the runtime of codes, but we will be looking at how well the code has
been structured. Keep unnecessary code statements to a minimum to attain high efficiency.
Code readability
We will look at how readable your code is, including variable names and structure of
conditions/loop/functions. Modular code is recommended, but does not guarantee good code
readability. Comments can improve code readability by allowing us to understand what certain
blocks of code do.
User-friendliness
While we don't expect you to create a GUI to display stylised text or images, we do expect that
the user is aware of what is going on in the program. Any changes that affect the user's input
or stored data must be printed out and the user needs to be informed.