Posts

Programming in Python CST 362 KTU CS Sixth Semester Elective Notes

About Me Syllabus About the Course Programming in Python CST 362 KTU University Question Papers and Answer Keys  Module 1:Programming Environment and Python Basics 1.Introduction to Python 2.Running Python Program- IDLE,Interactive Shell, Jupyter notebook 3.Identifiers, variables and keywords 4.Basic Python data types- numbers and strings, type conversion 5.Operators 6.Operator precedence and expression evaluation 7.Input and output- input() and print() 8.Formatting Text - Case Study 9.Built-in functions, modules and packages 10.The software development process 11.Simple programs to begin with, comments and statements 12.Basic Programs to try 13.Programs using built-in functions and modules For more Sample Programs ( contact) Control statements  14.Selection statement -if else,if elif, match case sample programs 15.Programs to Try using if else 16.Looping statements- while and for 17.break, continue and pass statements 18.nested loops 19.Sample programs using loops and nested loops 20.

Syllabus Programming in Python CST 362 KTU

SYLLABUS Module -1 (Programming Environment and Python Basics) (6 hours) Getting started with Python programming – Interactive shell, IDLE, iPython Notebooks, Detecting and correcting syntax errors, How Python works. The software development process –A case study. Basic coding skills – strings, assignment, and comments, Numeric data types and character sets, Expressions, Using inbuilt functions and modules. Control statements – Iteration with for/while loop, Formatting text for output, A case study, Selection structure (if-else, switchcase), Conditional iteration with while, A case study, Testing control statements, Lazy evaluation. Module -2 (Building Python Programs) (8 hours) Strings and text files – Accessing characters, substrings, Data encryption, Strings and number system, String methods, Text files, A case study on text analysis. Design with Functions – Functions as abstraction Mechanisms, Problem solving with top-down design, Design with recursive functions, Managing a program

Formatting Text-Case study

Image
Request Write a program that computes an investment report. Analysis The inputs to this program are the following: An initial amount to be invested (a floating-point number) A period of years (an integer) An interest rate (a percentage expressed as an integer) The program uses a simplified form of compound interest, in which the interest is computed once each year and added to the total amount invested. The output of the program is a report in tabular form that shows, for each year in the term of the investment, the year number, the initial balance in the account for that year, the interest earned for that year, and the ending balance for that year. The columns of the table are suitably labeled with a header in the first row. Following the output of the table, the program prints the total amount of the investment balance and the total amount of interest earned for the period. The proposed user interface is shown below Design The four principal parts of the program perform the following

About The Course Programming in Python CST 362 KTU

Image
CST 362 PROGRAMMING IN PYTHON Category PEC L T P 2 1 0 Credit 3 Year of Introduction 2019 Preamble: The objective of the course is to equip the learners to develop multi-module software solutions for real world computational problems using Python. It encompasses the Python programming environment, syntax, data representations, intermediate level features, GUI programming, Object Oriented Programming and data processing. This course lays the foundation to develop modular software solutions including complex interactive applications, network applications, and data-driven intelligent applications. Prerequisite: Basic knowledge in Computational Problem Solving, A course in any programming language. Course Outcomes: After the completion of the course the student will be able to  CO1:Write, test and debug Python programs (Cognitive Knowledge level: Apply) CO2: Illustrate uses of conditional (if, if-else and if-elif-else ) and iterative (while and for) statements in Python programs. (Cogn

Text Analysis- Case Study

In 1949, Dr. Rudolf Flesch published The Art of Readable Writing, in which he proposed a measure of text readability known as the Flesch Index. This index is based on the average number of syllables per word and the average number of words per sentence in a piece of text. Index scores usually range from 0 to 100, and they indicate readable prose for the following grade levels: Flesch Index                Grade   Level of Readability 0–30                                  College 50–60                                  High School 90–100                             Fourth Grade In this case study, we develop a program that computes the Flesch Index for a text file. Write a program that computes the Flesch Index and grade level for text stored in a text file Analysis The input to this program is the name of a text file. The outputs are the number of sentences, words, and syllables in the file, as well as the file’s Flesch Index and Grade Level Equivalent. During analysis, we consult expert

Data Encryption-Case Study

As you might imagine, data traveling on the information highway is vulnerable to spies and potential thieves. It is easy to observe data crossing a network, particularly now that more and more communications involve wireless transmissions. For example, a person can sit in a car in the parking lot outside any major hotel and pick up transmissions between almost any two computers if that person runs the right sniffing software. For this reason, many applications now use data encryption to protect information transmitted on networks.  Some application protocols have been updated to include secure versions that use data encryption.Examples of such versions are FTPS and HTTPS, which are secure versions of FTP and HTTP for file transfer and Web page transfer, respectively. Encryption techniques are as old as the practice of sending and receiving messages. The sender encrypts a message by translating it to a secret code, called a cipher text. At the other end, the receiver decrypts the cipher

Graphical User Interfaces ( GUI)

Image
Most modern computer software employs a graphical user interface or GUI. A GUI displays text as well as small images (called icons) that represent objects such as directories, files of different types,command buttons, and drop-down menus. In addition to entering text at the keyboard, the user of a GUI can select an icon with a pointing device, such as a mouse, and move that icon around on the display. Commands can be activated by pressing the Enter key or Control keys, by pressing a command button, or by selecting a dropdown menu item with the mouse. Put more simply, a GUI displays all information, including text, graphically to its users, and allows them to manipulate this information directly with a pointing device. The structure of a GUI program differs significantly from that of a terminal-based program. Second, a GUI program is event driven, meaning that it is inactive until the user clicks a button or selects a menu option. In contrast, a terminal-based program maintains constant