Programming in Python Assignment
Identify two advantages of Python that make it suitable for beginners. Also write a simple Python
1
statement to display a message on the screen.
Explain the importance of indentation in Python. Write a small code snippet showing correct and
2
incorrect indentation.
Differentiate between = and == with examples. Write a Python program to compare two
3
numbers and display the greater one.
Explain how user input is taken in Python and converted into an integer. Write a Python program
4
to take a number and print its cube.
Write a Python program using conditional statements to check whether a number is divisible by
5
both 3 and 5. Briefly explain the logic.
Write a Python program to create a list of numbers and display only the even numbers from the
6
list.
Write a Python program to count the number of vowels in a given string. Also display the total
7
count.
8 Write a Python program to print the multiplication table of a given number using a loop.
Create a Python function that takes two numbers as input and returns their sum. Call the
9
function with different values and display the result.
A file contains multiple lines of text. Write a Python program to read the file and display all lines.
10
Also write a statement to append a new line to the file.