The lab focuses on enhancing understanding of functions by modifying a program that converts numbers into their text string representations. Initially designed for numbers 0-999, the task is to extend its functionality to handle numbers up to 999999 by modifying the intName function. Students are required to submit their Python file and a screenshot of the program in action on Moodle.
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 ratings0% found this document useful (0 votes)
4 views1 page
Lab 6
The lab focuses on enhancing understanding of functions by modifying a program that converts numbers into their text string representations. Initially designed for numbers 0-999, the task is to extend its functionality to handle numbers up to 999999 by modifying the intName function. Students are required to submit their Python file and a screenshot of the program in action on Moodle.
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
You are on page 1/ 1
Lab 6
Objective: to have a better understanding of functions
This lab is based on the example in the PowerPoint of chapter 5, from slide #56 to slide #66. The program turns a number into its text string. The program handles numbers from 0-999, there are four functions: intName, digitName, tensName, teenName. In this lab, you need to use those functions but extend the range of numbers from 0-999999. You don’t need to add new functions but simply modify intName function to allow it to handle the numbers in thousand positions. The numbers are also from 0 -999. For example, number 345789 is translate into English as➔345 (translated into “Three hundred forty five”) +”thousand” +789 (and Seven hundred eighty nine). Please submit your .py file on Moodle and the screen shot of running of your program