0% found this document useful (0 votes)
12 views2 pages

Grade 7 Python Programming Exercises

The document is a Python worksheet for Grade 7 that contains 10 programming exercises. Each exercise requires the user to write a program that performs specific tasks based on user input, such as checking for even/odd numbers, divisibility, vowel/consonant words, comparisons between numbers, and more. The exercises aim to enhance students' understanding of basic programming concepts and logic.

Uploaded by

8369
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)
12 views2 pages

Grade 7 Python Programming Exercises

The document is a Python worksheet for Grade 7 that contains 10 programming exercises. Each exercise requires the user to write a program that performs specific tasks based on user input, such as checking for even/odd numbers, divisibility, vowel/consonant words, comparisons between numbers, and more. The exercises aim to enhance students' understanding of basic programming concepts and logic.

Uploaded by

8369
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 Worksheet – Grade 7

Q1. Write a program that asks the user to enter a number.


- If the number is divisible by 2, display "Even number".
- Otherwise, display "Odd number".

Q2. Write a program that asks the user to enter a number.


- If the number is divisible by 4 and 6, display "Divisible by both".
- If divisible only by 4, display "Divisible by 4".
- If divisible only by 6, display "Divisible by 6".
- Otherwise, display the number itself.

Q3. Write a program that asks the user to enter any word.
- If the word starts with a vowel, display "Vowel word".
- Otherwise, display "Consonant word".

Q4. Write a program that asks the user to enter two numbers.
- If the first number is greater than the second, display "First is bigger".
- If the second number is greater, display "Second is bigger".
- If both are equal, display "Both are equal".

Q5. Write a program that asks the user to enter a number.


- If the number is less than 0, display "Negative".
- If the number is equal to 0, display "Zero".
- If the number is greater than 0, display "Positive".

Q6. Write a program that asks the user to enter a year.


- If the year is a leap year, display "Leap Year".
- Otherwise, display "Not Leap Year".

Q7. Write a program that asks the user to enter a number.


- If the number is between 1 and 10, display "Small number".
- If the number is between 11 and 100, display "Medium number".
- If the number is greater than 100, display "Large number".

Q8. Write a program that asks the user to enter a sentence.


- Count and display the number of vowels in the sentence.

Q9. Write a program that asks the user to enter a number.


- Print the multiplication table of that number up to 10.

Q10. Write a program that asks the user to enter a number.


- If the number is a palindrome (same forward and backward), display "Palindrome".
- Otherwise, display "Not Palindrome".

You might also like