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

Python Basics Tutorial Sheet 1

This tutorial sheet provides a series of Python programming exercises covering input/output, variables, data types, arithmetic operations, string operations, type conversions, and functions. Each section contains specific tasks such as printing values, performing calculations, and manipulating strings. The instructions emphasize writing clean, well-commented code and using the input() function for user input.

Uploaded by

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

Python Basics Tutorial Sheet 1

This tutorial sheet provides a series of Python programming exercises covering input/output, variables, data types, arithmetic operations, string operations, type conversions, and functions. Each section contains specific tasks such as printing values, performing calculations, and manipulating strings. The instructions emphasize writing clean, well-commented code and using the input() function for user input.

Uploaded by

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

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

You might also like