Sunday, April 5, 2026

Ch 3A - Starter Problems For Newbies

Index    <<< Previous    Next >>>

Prompt to ChatGPT 5.3 Instant

I am teaching my sister Python coding. She is a complete novice to Python and programming. I asked her to do some very-very simple problems that can be solved in 1-2 lines of code like: - Print first ten numbers starting from 0 - Print first ten even numbers - Print table of 3 - Print characters in your full name - Print characters at even indices of your full name (note: indexing starts from 0) Can you give 25-30 more problems that are this simple?



That’s a great way to teach—tiny problems with immediate feedback work really well for beginners 👍
Since she’s just starting, I’ll keep these 1–3 line solvable, focused on loops, strings, and basic Python built-ins.


🧩 30 Simple Python Practice Problems

🔢 Numbers & Loops (Very Basic)

  1. Print numbers from 5 to 15

  2. Print numbers from 10 to 1 (reverse order)

  3. Print all odd numbers from 1 to 20

  4. Print squares of numbers from 1 to 10

  5. Print cubes of numbers from 1 to 5

  6. Print numbers divisible by 3 between 1 and 30

  7. Print the sum of first 10 natural numbers

  8. Print multiplication table of 7

  9. Print numbers from 1 to 20, but skip multiples of 4

  10. Print numbers from 1 to 20, stop when number is 13


🔤 Strings (Very Important for Beginners)

  1. Print each character of the word "Python"

  2. Print characters of your name in reverse

  3. Print only vowels in your name

  4. Count number of characters in your name

  5. Print first and last character of your name

  6. Convert your name to uppercase

  7. Convert your name to lowercase

  8. Print characters at odd indices of your name

  9. Replace all 'a' in your name with '*'

  10. Check if a given word is in uppercase


🔄 Built-in Functions Practice

  1. Find maximum of these numbers: [3, 7, 2, 9, 5]

  2. Find minimum of these numbers

  3. Find sum of numbers in a list

  4. Find length of a list

  5. Sort a list of numbers

  6. Convert a number to string

  7. Convert string "123" to integer

  8. Find absolute value of -25

  9. Round off 3.7

  10. Generate a list of numbers from 1 to 10 using range()


🎯 Slightly Fun / Thinking (Still Easy)

  1. Print "Hello" 5 times

  2. Print "Hi" 3 times using a loop

  3. Print numbers from 1 to 10 with "Number:" before each (e.g., Number: 1)

  4. Print all characters except spaces in "My Name Is"

  5. Count how many times 'a' appears in "banana"


💡 Teaching Tip (Important)

Once she solves a few, ask:

  • “Can you do this in a different way?”

  • “Can you make it shorter?”

  • “Can you use a built-in function instead?”

This builds real understanding instead of memorization.

No comments:

Post a Comment