Download as pdf or txt
Download as pdf or txt
You are on page 1of 9

Fundamentals of

Programming
in C, Java, JavaScript and Python
Objective

The tasks for this week aim at


introducing you to four widely used
programming languages – C, Java,
JavaScript, and Python.
Tasks 1 through 4 are programming
questions, solving which will require
you to explore online and learn
actively about each of the
languages. Task 5 is a challenging
task that will kindle your creative
side to build four simple applications
to put the knowledge you’ve gained
to test.
Instructions
1. All the tasks should be coded in all 4
languages.
2. Task 1-4: Submit a PDF file with snapshots
of the code written and the corresponding
output.
3. Task 5: Create a video demonstration of the
4 applications developed and upload the
code files to your GitHub page
4. Submission is due: 9th January 2021 EOD
Task 1

Explore the fundamental data types


available in each of the 4 languages.
Create variables to hold the different
types and initialize them with appropriate
values. Now comes the fun part, compute
how much of the memory (in bytes) each
of the variables have captured.
Task 2

Write a program to prompt the user to


enter a number, print “Odd” if it’s an odd
number, and “Even” if it’s an even
number.
Well, that was boring, let’s take that up a
notch. Modify your program to fetch
the current time of your system, print it
out and check if the current second
is odd or even!
Task 3
It’s often crazy how much time our
programs spend in loops, doing the same
old thing repeatedly. Let’s battle it out
with the loops by printing some patterns.
Print the half pyramid using for loops and
the inverted half pyramid using while
loops.
Task4

Before moving on to the question, take


some time out to understand the anatomy
of functions in the 4 languages specified.
Now, write a function that takes a string
as an argument and returns the string
with its cases swapped. In other words,
convert all lowercase letters to upper
case letters and vice versa.
Now, here is a

Challenge
for you

The goal of this task is to apply the skills


and knowledge you’ve gained in exploring
the fundamentals of programming to
create a simple application in each of the
4 languages – C, Java, JavaScript, and
Python. You can research online to
develop an understanding of what each
language is best used for or what’s the
edge it has over other languages. The four
applications that you will be creating can
be console-based or GUI based.
All the Best!

You might also like