Python Classroom Series – 17/Jul/2020

Our character: Jarvis

Preview

Problem to be solved

  • Have a conversation with Jarvis to find if the given number is pallindrome
if you give 353 to jarvis he should output pallendrome
if you give 100 to jarvis he should output not pallendrome
  • Lets have conversation with Jarvis about reverse of number
reversenumber: (input number)
Hi Jarvis, How are you doing
Rememeber 0 as reverse
Repeat till number is grater than 0
   calculate remainder = number%10
   calculate reverse = reverse*10 + remainder
   calculate number = number/10

return reverse
   
  • Now lets check if the number is pallendrome
is_pallendrome:
Remember 101 as number1
check if number1 == reversenumber(number1)
  if yes show number1 is pallendrome
  else show number1 is not pallendrom

Remember 354 as number2
check if number2 == reversenumber(number2)
  if yes show number2 is pallendrome
  else show number2 is not pallendrom

Jarvis upgraded

Preview

Personal finance Hint

  • Look at power of compounding calculator Here
  • Programming Specific: Try to come up with converstion to get Jarvis calculate power of compounding for you. Duration: Take a week if you want.
  • Plan: We will take this conversation and build a Calculator in Python once we become good at python

Activities to be done over weekend

Next Steps

  • DataTypes
  • Instructions in Programming languages
  • Conditional & Looping instructions
  • Conversations with Jarvis into Python
  • Debugging

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

About learningthoughtsadmin