Thursday, November 2, 2023

UNIT - 2 [PYTHON]

  UNIT-2 

We are committed to providing thorough Python resources that are especially suited to the JNTUK University R2O program. We will explore control statements in this blog post, going over topics like text output, loop formatting, and definite iteration. We will also look at conditional iteration with the while loop and selection statements, such as if and if-else statements.
Any computer language must include strings and text files, and Python is no different. We will go over data encryption methods and how to access characters and substrings within strings. In addition, we will discuss string and number systems and offer important insights into how they work. Finally, we will investigate the wide variety of string operations that Python offers and look at the nuances involved with handling text files.
Our goal at LetsLearningCse is to make learning Python entertaining and educational. We take great care in selecting our materials so that they correspond with the JNTUK University R2O syllabus and give students a thorough comprehension of the material. As we continue to assist you in your educational path, stay tuned for more interesting articles about Python.empowering students, one Python idea at a time using LetsLearningCse.

What are we going to gain from this material?

  • Control statements: control statements are the program statements that allow the computer to select a part of the code or repeat an action to specify it. They are categorized into selection statements, iterative statements, looping statements, and jump statements.
  • iterative statements: this was classified into mainly 2 categories.There are definite iterations and indefinite iterations.
  • Definite Iteration: for a loop, it is a definite iteration; it iterates until the sequence exists.
  •  conditional iteration: the A loop that requires a condition to be tested within the loop to determine whether the loop should continue is called the loop's continuation condition. If the continuation condition is false, the loop ends. If the continuation condition is true, the statements within the loop are executed again.
  • While loop: it is a conditional iteration statement and is frequently used to execute a block of statements repeatedly until some condition remains true. 
  • Formatting text for output: the total number of data characters and additional spaces for a given data in a formatted string is called its field width. The formatting output, rather than simply printing space-separated values, can be done in three ways: Formatting output using the string modulo operator (%) formatting output using the format method f-literal in Python
  • strings: a string is a sequence of characters enclosed in single or double quotation marks. It is a data structure. A data structure is a compound unit that consists of several smaller pieces of data. The string is an immutable data structure.
  • Data Encryption: Data encryption is used to protect information transmitted on networks. Data encryption is a security method where information is encoded and can only be accessed or decrypted by a user with the correct encryption key
  •  Number Systems: When you perform arithmetic operations, you use the decimal number system. A binary number system is used to represent all information on a digital computer.
  • Text files: all files must be opened first before they can be read from or written to using Python's built-in open() function. write(): This method is used to write the contents of a string to the file. read(): This method is used to read the contents of a file. remove(): to delete a file
 Link to the material:    UNIT-2
 

No comments: