Premium Essay

Pt1420 Week 3 Programming Assignment

Submitted By
Words 562
Pages 3
This week’s programming assignment on how to sort fruits and arrange them in alphabetical order was not easy to do. It took me to do many examples and readings to understand the code in looping structure that is for loop, in the while loop. I have to run module several times, back and forth and carefully observe and do many examples to be able to arrange all the fruit in alphabetical order. What I have learnt so far programming is that, no matter what you code if you do not give the right codes at the right place, you will not get results.
Also I learnt something on the concept of a tuple which In mathematics, a tuple is an ordered list of elements. Related to this is an n-tuple, which in set theory is a collection (sequence) of "n" elements. …show more content…
Python uses indentation as its method of grouping statements. What I have realized is that the key point of the while loop is that the loop might not ever run. When the condition is tested and the result is false, the loop body will be skipped and the first statement after the while loop will be executed.
The skill and knowledge that I have recognize gain in reading of the lopping is that a loop becomes infinite loop if a condition never becomes FALSE. You must use caution when using while loops because of the possibility that this condition never resolves to a FALSE value. This results in a loop that never ends. Such a loop is called an infinite loop.
An infinite loop might be useful in client/server programming where the server needs to run continuously so that client programs can communicate with it as and when required. Python supports to have an else statement associated with a loop statement. If the else statement is used with a for loop, the else statement is executed when the loop has exhausted iterating the list. If the else statement is used with a while loop, the else statement is executed when the condition becomes

Similar Documents

Free Essay

Pt1420 Unit 6 Assignment 1

...Week 06 Assignments Textbook Reading * Chapter 4 * Chapter 5 sections 5.1, 5.2, and 5.3 (pages 196-201) Week 06 Homework From the Gaddis textbook: * Programming Exercises 2, 6 and 9, on pages 160-161 For the Programming Exercises, design a program means write the pseudocode for the program. Except for Programming Exercise 2, your design should include multiple modules, not just main(). Upload a Microsoft Word document with the pseudocode to your shared PT1420 community website or submit a paper copy to your instructor by the beginning of the Week 7 class. Programing Exercises pg. 160-161 2. Areas of rectangles Module Main() Declare width1 integer = 0 Declare length1 integer = 0 Declare width2 integer = 0 Declare length2 integer = 0 Declare area1 integer = 0 Declare area2 integer = 0 Call rectangle1 (width1, length1, area1) Call rectangle2 (width2, length2, area2) Call comparison (rectangle1, rectangle2) Display “press enter to continue” End module Module rectangle1 (value width1 as integer, value length1 as integer, value area1 as integer) Display "Enter the width of rectangle 1” Input width1 Display "Enter the length of rectangle 1" Input length1 area1 = width1 * length1 End module Module rectangle2 (value width2 as integer, value length2 as integer, value area2 as integer) Display "Enter the width of rectangle 2” Input width2 Display "Enter the length of rectangle 2" Input length2 area2 = width2 * length2 End module ...

Words: 764 - Pages: 4

Premium Essay

Unit 5

...Kelly McLoughlin PT1420 Week 1 Assignment 1 Review Questions 1. A( n) __________ is a set of instructions that a computer follows to perform a task. (B) Program 2. The physical devices that a computer is made of are referred to as __________. (A) Hardware 3. The part of a computer that runs programs is called __________. (D) Cpu 4. Today, CPUs are small chips known as __________. (B) Microprocessor 5. The computer stores a program while the program is running, as well as the data that the program is working with, in __________. (C) Main Memory 6. This is a volatile type of memory that is used only for temporary storage while a program is running. (A) RAM 7. A type of memory that can hold data for long periods of time— even when there is no power to the computer–– is called __________. ( C ) Secondary Storage 8. A component that collects data from people or other devices and sends it to the computer is called __________. (B) An Input Device 9. A video display is a( n) __________. (A) Output device 10. A __________ is enough memory to store a letter of the alphabet or a small number. (A) Byte 11. A byte is made up of eight __________. (D) Bits 12. In a( n) __________ numbering system, all numeric values are written as sequences of 0s and 1s. (B) Binary 13. A bit that is turned off represents the following value: __________. ( C ) 0 14. A set of 128 numeric codes that represent the English letters, various punctuation marks, and other...

Words: 454 - Pages: 2

Premium Essay

Its Making Put Something Here

...PT1420 Introduction to Programming Week-2 Lesson Plan TUE 6:00 PM to 10:30 PM Instructor: Tushar Patel (tspatel02@yahoo.com, tpatel@itt-tech.edu) CLASS: Topic: Unit 2: Software Program Design I Course Objectives Covered by This Unit CO2: Design programs by using flowcharts and pseudo code. CO3: Write programs that perform input, processing, and output. Unit Learning Outcomes LO8: Determine program input, processing, and output stages. LO9: Create the necessary flowcharts to describe a program’s structure. LO10: Use pseudocode to define a program’s structure. LO11: Formulate solution algorithms for calculations by properly following the order of operations. Key Concepts ▪ Determining input, process, and output ▪ Creating flowcharts and pseudocode ▪ Formulating algorithms Reading ▪ Gaddis, Chapter 2: “Introduction to Computers and Programming,” pages 29-55 Resources: • Data Projector • ITT Virtual Library • Text Books • Visual Studio • Lab Computers • Student Removable Hard Drive • VM Ware Player Methods: • Lecture • Group Discussion • Lab Work • Review exercise / Research Papers • Quiz Brief Lesson Overview: Today’s lecture we would be discussing the following topics. • Discuss how all programs basically consist of a three-step process: input, process, and output. Use the payroll calculation program...

Words: 895 - Pages: 4

Premium Essay

Nt2640

...is required in the associate degree program in Network Systems Administration and associate degree in Mobile Communications Technology. The following diagrams indicate how this course relates to other courses in respective programs: Network Systems Administration NT2799 NSA Capstone Project NT2580 Introduction to Information Security NT2670 Email and Web Services NT2640 IP Networking PT2520 Database Concepts NT1330 Client-Server Networking II NT1230 Client-Server Networking I NT1430 Linux Networking PT1420 Introduction to Programming NT1110 Computer Structure and Logic NT1201 Introduction to Networking NT1310 Physical Networking CO2520 Communications SP2750 Group Theories EN1420 Composition II EN1320 Composition I GS1140 Problem Solving Theory GS1145 Strategies for the Technical Professional MA1210 College Mathematics I MA1310 College Mathematics II Networking Technology Courses Programming Technology Courses General Education/ General Studies 1 Date: 7/18/2011 IP Networking Syllabus Mobile Communications Technology MC2799 MCT Capstone Project NT2640 IP Networking MC2560 Mobile Wireless Communication I MC2660 Mobile Wireless Communication II MC2665 Mobile...

Words: 2573 - Pages: 11

Premium Essay

Pt1420 Week 1 Research Paper

...28, 2015 PT1420 Week 1 assignment COBOL, is a compiled English-like computer programming language designed for business use. It is imperative, procedural and, since 2002, object-oriented. COBOL is primarily used in business, finance, and administrative systems for companies and governments. In 1997, Gartner Group estimated that there were a total of 200 billion lines of COBOL in existence, which ran 80% of all business programs. COBOL is still widely used in legacy applications deployed on mainframe computers, such as large-scale batch and transaction processing jobs. But due to its declining popularity and the retirement of experienced COBOL programmers, programs are being migrated to new platforms, rewritten in modern languages or replaced with software packages. Most programming in COBOL is now purely to maintain existing applications. COBOL was designed in 1959 by the Conference on Data Systems Languages (CODASYL) and was largely based on previous programming language design work by Grace Hopper, commonly referred to as "the (grand)mother of COBOL". It was created as part of a US Department of Defense effort to create a portable programming language for data processing. Intended as a temporary stopgap, the Department of Defense promptly forced computer manufacturers to provide it, resulting in its widespread adoption. It was standardized in 1968 and has since been revised four times. Expansions include support for structured and object-oriented programming. The current...

Words: 1060 - Pages: 5

Premium Essay

Nothing

...ITT Technical Institute NT1310 Physical Networking Student Course Package Bring this document with you each week Students are required to complete each assignment and lab in this course package on time whether or not they are in class. Late penalties will be assessed for any assignments or labs handed in past the due date. The student is responsible for replacement of the package if lost. Table of Contents Syllabus 2 Student Professional Experience 19 Graded Assignments and Exercises 23 Labs 47 Documenting your Student Professional Experience 57 ITT Technical Institute NT1310 Physical Networking Onsite Course SYLLABUS Credit hours: 4.5 Contact/Instructional hours: 56 (34 Theory Hours, 22 Lab Hours) Prerequisite(s) and/or Corequisite(s): Prerequisites: NT1210 Introduction to Networking or equivalent Course Description: This course examines industry standards and practices involving the physical components of networking technologies (such as wiring standards and practices, various media and interconnection components), networking devices and their specifications and functions. Students will practice designing physical network solutions based on appropriate capacity planning and implementing various installation, testing and troubleshooting techniques for a computer network. Where Does This Course Belong? | | | NT2799 | | | | | | | | NSA Capstone | | | | | | | Project | | | | | NT2580...

Words: 10839 - Pages: 44