Homework 5: An Interview Coding Challenge Question

Objective: Using a For Loop

This homework question comes to us from a group of current and former CCSF students who meet semi-regularly on Saturdays. You can come find out when our next meeting is by finding a fellow student (see more work from Take Five here).

Write a program which reverses a number (see sample output) using a for loop and arithmetic operators available in python:

Rules

Here is some sample output:

[grwoo@hills cs110a_sp19]$ python hw05.py 
Please enter in a number (for example 12345) and I will reverse it: 12345
54321
[grwoo@hills cs110a_sp19]$ python hw05.py 
Please enter in a number (for example 12345) and I will reverse it: 2345678
8765432