SlideShare a Scribd company logo
PART 8
USER INPUTS IN PYTHON
• WANT TO LEARN PYTHON PROGRAMMING? (SUBTITLES)
• SUBSCRIBE
• TELEGRAM – FreeCodeSchool
• Twitter – shivammitra4
• LinkedIn – shivammitra
• Link in description
• Most programs are written to solve end user’s problem
• We need to get input from the users
• Check whether a person can vote or not ?
• Check whether a number is even or odd ?
INPUT FUNCTION IN PYTHON
Input function takes only one argument
The function waits for user input and continues once user presses enter
Write meaningful messages
HOW TO ACCEPT NUMERICAL INPUTS ?
PART 8 - Python Tutorial | User Input In Python With Examples
HOW TO ACCEPT A LIST ?
PART 8 - Python Tutorial | User Input In Python With Examples
PART 8 - Python Tutorial | User Input In Python With Examples
PART 8 - Python Tutorial | User Input In Python With Examples
USE LIST
COMPHEHENSION ?
PROGRAMS TO PRACTICE
• Check if a number is odd or even
• Check if one can vote or not
• Find the sum of all the numbers
Assignment:
• Print the table of a number ( take input from user )
• Check if a number is multiple of 10 or not ( take input from the user )
WHILE LOOP IN PYTHON

More Related Content

PPTX
PART 9 - Python Tutorial | While Loop In Python With Examples
PPTX
Part 2 - Python Tutorial | Introduction to Lists
PPTX
[Yu cheng lin]cloud presentation - Raft
PPTX
Python Internals Optimization Choices Made - Codementors Office Hours with St...
PDF
cos 102 - getting into programming with python.pdf
PPTX
PYTHON Introduction 1Deep learning 2.pptx
PPTX
Function in Python
PART 9 - Python Tutorial | While Loop In Python With Examples
Part 2 - Python Tutorial | Introduction to Lists
[Yu cheng lin]cloud presentation - Raft
Python Internals Optimization Choices Made - Codementors Office Hours with St...
cos 102 - getting into programming with python.pdf
PYTHON Introduction 1Deep learning 2.pptx
Function in Python

Similar to PART 8 - Python Tutorial | User Input In Python With Examples (20)

PPTX
python-presentationpython-presentationpython-presentation.pptx
DOCX
Magic 8 ball putting it all together
PPTX
Programming with python
PPT
PE1 Module 3.ppt
PPTX
Python Introduction controll structures and conprehansion
PPTX
Introduction to Python Basics Programming
DOCX
PROJECT(voting system, rock paper scissor, emoji creation , tick tack toe in ...
PDF
Introduction to phyton , important topic
PPTX
PYTHON PPT.pptx python is very useful for day to day life
PDF
Python cheatsheat.pdf
PPTX
PYTHON PROGRAMMING
PPTX
An Introduction : Python
PPTX
Mastering python lesson2
PPTX
IoT-Week1-Day1-Lab.pptx
PDF
Introduction to python programming [part 1]
PPTX
Integrating Python with SQL (12345).pptx
PDF
Introduction to Python Programming | InsideAIML
PPTX
Python.pptx
PDF
PDF
Introduction To Programming with Python
python-presentationpython-presentationpython-presentation.pptx
Magic 8 ball putting it all together
Programming with python
PE1 Module 3.ppt
Python Introduction controll structures and conprehansion
Introduction to Python Basics Programming
PROJECT(voting system, rock paper scissor, emoji creation , tick tack toe in ...
Introduction to phyton , important topic
PYTHON PPT.pptx python is very useful for day to day life
Python cheatsheat.pdf
PYTHON PROGRAMMING
An Introduction : Python
Mastering python lesson2
IoT-Week1-Day1-Lab.pptx
Introduction to python programming [part 1]
Integrating Python with SQL (12345).pptx
Introduction to Python Programming | InsideAIML
Python.pptx
Introduction To Programming with Python
Ad

More from Shivam Mitra (19)

PPTX
Preparing for SRE Interviews
PPTX
PART 4 - Python Tutorial | If Else In Python With Examples
PPTX
PART 3 - Python Tutorial | For Loop In Python With Examples
PPTX
PART 6 - Python Tutorial | Tuples In Python With Examples
PPTX
PART 10 - Python Tutorial | Functions In Python With Examples
PPTX
PART 7 - Python Tutorial | Dictionaries In Python With Examples
PPTX
PART 0 - Python Tutorial | Why should you learn python
PPTX
PART 1 - Python Tutorial | Variables and Data Types in Python
PPTX
Memory management in operating system | Paging | Virtual memory
PPTX
Process Synchronization in operating system | mutex | semaphore | race condition
PPTX
Process Scheduling Algorithms | Interviews | Operating system
PPTX
Threads in Operating System | Multithreading | Interprocess Communication
PPTX
Process management in operating system | process states | PCB | FORK() | Zomb...
PPTX
Introduction to operating system, system calls and interrupts
PPTX
What is Internet and How it Works
PPTX
OSI Model Layers and Internet Protocol Stack
PPTX
Basics of Stock Market
PPTX
Assets vs liability
PPTX
Pycricbuzz - a python library to fetch live cricket scores
Preparing for SRE Interviews
PART 4 - Python Tutorial | If Else In Python With Examples
PART 3 - Python Tutorial | For Loop In Python With Examples
PART 6 - Python Tutorial | Tuples In Python With Examples
PART 10 - Python Tutorial | Functions In Python With Examples
PART 7 - Python Tutorial | Dictionaries In Python With Examples
PART 0 - Python Tutorial | Why should you learn python
PART 1 - Python Tutorial | Variables and Data Types in Python
Memory management in operating system | Paging | Virtual memory
Process Synchronization in operating system | mutex | semaphore | race condition
Process Scheduling Algorithms | Interviews | Operating system
Threads in Operating System | Multithreading | Interprocess Communication
Process management in operating system | process states | PCB | FORK() | Zomb...
Introduction to operating system, system calls and interrupts
What is Internet and How it Works
OSI Model Layers and Internet Protocol Stack
Basics of Stock Market
Assets vs liability
Pycricbuzz - a python library to fetch live cricket scores
Ad

Recently uploaded (20)

PDF
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
PPTX
Cell Structure & Organelles in detailed.
PPTX
Microbial diseases, their pathogenesis and prophylaxis
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PDF
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
PDF
O7-L3 Supply Chain Operations - ICLT Program
PDF
FourierSeries-QuestionsWithAnswers(Part-A).pdf
PDF
O5-L3 Freight Transport Ops (International) V1.pdf
PDF
Sports Quiz easy sports quiz sports quiz
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PPTX
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
PPTX
Renaissance Architecture: A Journey from Faith to Humanism
PPTX
master seminar digital applications in india
PDF
Module 4: Burden of Disease Tutorial Slides S2 2025
PPTX
BOWEL ELIMINATION FACTORS AFFECTING AND TYPES
PDF
TR - Agricultural Crops Production NC III.pdf
PDF
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
PDF
102 student loan defaulters named and shamed – Is someone you know on the list?
PDF
01-Introduction-to-Information-Management.pdf
PPTX
Institutional Correction lecture only . . .
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
Cell Structure & Organelles in detailed.
Microbial diseases, their pathogenesis and prophylaxis
STATICS OF THE RIGID BODIES Hibbelers.pdf
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
O7-L3 Supply Chain Operations - ICLT Program
FourierSeries-QuestionsWithAnswers(Part-A).pdf
O5-L3 Freight Transport Ops (International) V1.pdf
Sports Quiz easy sports quiz sports quiz
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
Renaissance Architecture: A Journey from Faith to Humanism
master seminar digital applications in india
Module 4: Burden of Disease Tutorial Slides S2 2025
BOWEL ELIMINATION FACTORS AFFECTING AND TYPES
TR - Agricultural Crops Production NC III.pdf
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
102 student loan defaulters named and shamed – Is someone you know on the list?
01-Introduction-to-Information-Management.pdf
Institutional Correction lecture only . . .

PART 8 - Python Tutorial | User Input In Python With Examples

  • 1. PART 8 USER INPUTS IN PYTHON • WANT TO LEARN PYTHON PROGRAMMING? (SUBTITLES) • SUBSCRIBE • TELEGRAM – FreeCodeSchool • Twitter – shivammitra4 • LinkedIn – shivammitra • Link in description
  • 2. • Most programs are written to solve end user’s problem • We need to get input from the users • Check whether a person can vote or not ? • Check whether a number is even or odd ?
  • 3. INPUT FUNCTION IN PYTHON Input function takes only one argument The function waits for user input and continues once user presses enter Write meaningful messages
  • 4. HOW TO ACCEPT NUMERICAL INPUTS ?
  • 6. HOW TO ACCEPT A LIST ?
  • 11. PROGRAMS TO PRACTICE • Check if a number is odd or even • Check if one can vote or not • Find the sum of all the numbers Assignment: • Print the table of a number ( take input from user ) • Check if a number is multiple of 10 or not ( take input from the user )
  • 12. WHILE LOOP IN PYTHON