Week 4A Lab - Python Input and Basic Operators PDF
Document Details
Uploaded by Deleted User
NU Dasmariñas
Joevan U. Sacdalan
Tags
Related
- Csc 102 Lecture 4 Introduction to Programming (Python) PDF
- Python Programming Assignment PDF
- Introduction to Python Programming PDF
- Computer Science Class XI Past Paper PDF 2023-24
- Python Programming Past Paper PDF 18CS34
- CS 110: Computer Science Fundamentals Expressions and Arithmetics Lec06_expressions01 PDF
Summary
This document is lecture notes for a Python programming course, covering user input and basic operators. It explains how Python handles user input and introduces various arithmetic operators. The notes cover addition, subtraction, multiplication, division, modulus, exponentiation, and floor division. It also introduces assignment operators and their use in Python programming.
Full Transcript
NU - DASMARIÑAS Python Input and Basic Operators Introduction to Computing Week 3 1st Term 2024 - 2025 Joevan U. Sacdalan School of Engineering, Computing, and Architecture User Input Python allows for user input. Python uses the input() method. Python stops executing when it comes...
NU - DASMARIÑAS Python Input and Basic Operators Introduction to Computing Week 3 1st Term 2024 - 2025 Joevan U. Sacdalan School of Engineering, Computing, and Architecture User Input Python allows for user input. Python uses the input() method. Python stops executing when it comes to the input() function, and continues when the user has given some input. Python Operators Operators are used to perform operations on variables and values. Python divides the operators in the following groups: Arithmetic operators Assignment operators Comparison operators Logical operators Identity operators Membership operators Bitwise operators Arithmetic Operators Arithmetic operators are used with numeric values to perform common mathematical operations Addition Subtraction Multiplication Division Modulus Exponentiation Floor Division Format Float (limit decimal places) Assignment Operators Assignment operators are used to assign values to variables. Assignment Addition Assignment Subtraction Assignment Multiplication Assignment Division Assignment Modulus Assignment Exponentiation Assignment Floor Division Assignment