Python Programming – Tutorial Sheet 1
School of Artificial Intelligence, Bennett University
Topics: Basics of Python
Instructions
● Solve all questions using Python code either on pen paper or Google Colab.
● Use input() for taking values.
● Write clean, well-commented code.
Section A – Input / Output
1. Print your name.
2. Take your name as input and print it.
3. Input two numbers and print them.
4. Print: Welcome to Python Programming
Section B – Variables & Data Types
1. Store your age and print it.
2. Store a float value and print its type.
3. Store a string and print its length.
4. Swap two numbers.
Section C – Arithmetic Operations
1. Add two numbers.
2. Subtract two numbers.
3. Multiply two numbers.
4. Divide two numbers.
5. Find remainder.
6. Find square of a number.
7. Find cube of a number.
Section D – String Operations
1. Concatenate two strings.
2. Print first character of a string.
3. Print last character of a string.
4. Convert string to uppercase.
Section E – Type Conversions
1. Convert int to float.
2. Convert float to int.
3. Convert string to integer.
4. Convert integer to string.
Section F – Functions
1. Function to add two numbers.
2. Function to find square.
3. Function to return your name.
4. Function to find length of string.
End of Tutorial Sheet