0% found this document useful (0 votes)
1 views1 page

Assignment 1 - Variables and Data Types

The document outlines a programming assignment consisting of 21 tasks focused on variables and data types. Tasks include printing messages, performing arithmetic operations, converting units, and calculating areas and interests. The assignment aims to enhance programming skills through practical coding exercises.

Uploaded by

optics optics
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1 views1 page

Assignment 1 - Variables and Data Types

The document outlines a programming assignment consisting of 21 tasks focused on variables and data types. Tasks include printing messages, performing arithmetic operations, converting units, and calculating areas and interests. The assignment aims to enhance programming skills through practical coding exercises.

Uploaded by

optics optics
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

Assignment 1: Variables and Data types

1. Write a program to print Hello.


2. Write a program to print your first name and last name on the screen.
3. Develop a code to demonstrate the single and multiline comment.
4. Write a program to print the following on the screen:

**********************
| |
| Welcome |
| |
**********************

5. Write a program to display the following output:


Subject Marks
Maths 74
Computer 68
Social Science 84

6. Write a program to read an integer from the user and print it on the screen.
7. Write a program to input two numbers and print its addition, subtraction, multiplication and
division.
8. Write a program to input rupees and print its value converted to Dollar.
9. Write a program to input a number from user and print its multiplication table up to
10. Write a program to input a number and print its square and cube.
11. Write a program which accepts temperature in Fahrenheit and print it in centigrade.
12. Write a program to calculate the area of a rectangle.
13. Write a program to calculate the area and perimeter of a circle.
14. Write a program to calculate the area of a triangle.
15. Write a program to calculate simple interest taking input from the user.
16. Write a program to take any employee details and display it.
17. Write a program to take a number from user decrement the value by 3
18. Write a program to convert temperature from Fahrenheit to Celsius degrees.
19. Write a program that reads a number in inches and converts it to meters.
20. Write a program which accepts a character and displays its next character.
21. Write a program that reads an integer between 1000 and 9999 and adds all the digits in the
integer.

Page 1 of 1

You might also like