SlideShare ist ein Scribd-Unternehmen logo
1 von 3
Downloaden Sie, um offline zu lesen
Python Questions & Answers
Tutorial Part-1
Q.1. What is the role of keywords in Python language? List keywords provided by
Python​.
A) The Keywords in Python you can say as reserved words. All keywords are with Small
case. Only 3 keywords are not Small case. Those are True, False and None
and False nonlocal
as finally not
assert for or
break from pass
class global raise
continue if return
def import True
del in try
elif is while
else lambda with
except None yield
Q.2. What is an identifier? How will you differentiate it from a variable?
A). Identifier is an user defined variable. This can be name given to Function, Class, and
Variable by user. The length can be any length. It cannot start with numbers. And, it cannot
contain special chars.
Q.3. what is a variable? State the rules used to define a variable in Python language.
A). It is an user-defined variable. Basically it indicates a data-type. In Python, you can define
dynamically where you want. The data type it assigns dynamically according to value you
assigned to a variable. Example Char or Int
Q.4. Why documentation is necessary in a language? How documentation can be
performed in Python?
A). In Python, to make developer understand the logic, in the middle, you can write
comments. These comments start with ‘#’. This is called documentation.
Q.5. Explain the significance of data types in Python language?
A). The value you assigned to a variable defined by you, says that, that particular type applies
to that variable.
Python supports 7 data types – Number, String, List, Tuple, Set, Dictionary and File
Q.6. Identify the data type that appropriately describes the data given below:
a. 32.e10 ​➔​ Complex
b. -8.56e100 ​➔​ Float
c. 34.j ​➔​ Complex
d. -876 ​➔​ Int
e. 432 ​➔​ Int
f. 4375457L ​➔​ Long
Q.7. List all the data types provided by Python language.
int long float complex
50 3682936L 4.3 5.78j
555 -0X5789L 56.28 .863j
-897 0231L -87.32 30+29J
-1976 0XDE567AFE -56.27e10 4.24e-8j
-936 -2467896435L 71.e19 45.j
Q.8. How will you distinguish list and tuple data types?
List - is like an array a= [1,2,3,4,5,6]
Tuple - But it is immutable. That means data in a tuple is write protected. Data in a tuple is
written using parenthesis and commas
Q.9. Differentiate between set and dictionary data type in Python.
Set is an unordered collection of unique items.
a = {15, 20, 13, 45, 67}
Q.10. Explain all the data types provided by Python language with appropriate
illustrations.
Number, String, List, Tuple, Set, Dictionary and File
Example for Dictionary:
dict2 = {'name': 'Smith', 'code': 1234, 'dept':'HR'}
Dictionary is an unordered collection of key value pairs.
The file data type is used in Python to store and work with files on the computer or on
the Internet​.
Q.11. What is a slicing operator? How can you use it? Illustrate.
Python slicing is to extract part of string from your main string. This concept is called
unstring in COBOL.
Q.12. How can a user interact with the Python interpreter?
A). By typing ‘python’ on Linux, you can enter into python interpreter.
>>>
Q.13. Signify the role of input and output functions provided by Python language.
A). You can interact by using input() and print() functions. Input is to get input from user.
Print is for output.
14. How will you format the output in Python?
A). Output(), you can see many formats those you can use to display
● Print(‘ I am in output’, a)
● Print(‘I am {0} in output’.format(‘first’,’second’)
● Using format symbols
Q​.15. Elaborate the significance of import command in Python with a suitable example.
A). The import command you can use to import your’.py’ module into python interpreter.

Weitere ähnliche Inhalte

Was ist angesagt?

Ground Gurus - Python Code Camp - Day 3 - Classes
Ground Gurus - Python Code Camp - Day 3 - ClassesGround Gurus - Python Code Camp - Day 3 - Classes
Ground Gurus - Python Code Camp - Day 3 - ClassesChariza Pladin
 
Python interview question for students
Python interview question for studentsPython interview question for students
Python interview question for studentsCorey McCreary
 
Python programming msc(cs)
Python programming msc(cs)Python programming msc(cs)
Python programming msc(cs)KALAISELVI P
 
11 Unit 1 Chapter 02 Python Fundamentals
11  Unit 1 Chapter 02 Python Fundamentals11  Unit 1 Chapter 02 Python Fundamentals
11 Unit 1 Chapter 02 Python FundamentalsPraveen M Jigajinni
 
The Awesome Python Class Part-4
The Awesome Python Class Part-4The Awesome Python Class Part-4
The Awesome Python Class Part-4Binay Kumar Ray
 
Introduction To Programming with Python Lecture 2
Introduction To Programming with Python Lecture 2Introduction To Programming with Python Lecture 2
Introduction To Programming with Python Lecture 2Syed Farjad Zia Zaidi
 
Introduction to Python
Introduction to Python Introduction to Python
Introduction to Python amiable_indian
 
Frequently asked tcs technical interview questions and answers
Frequently asked tcs technical interview questions and answersFrequently asked tcs technical interview questions and answers
Frequently asked tcs technical interview questions and answersnishajj
 
C programming session 11
C programming session 11C programming session 11
C programming session 11Dushmanta Nath
 
Python breakdown-workbook
Python breakdown-workbookPython breakdown-workbook
Python breakdown-workbookHARUN PEHLIVAN
 

Was ist angesagt? (20)

Data handling CBSE PYTHON CLASS 11
Data handling CBSE PYTHON CLASS 11Data handling CBSE PYTHON CLASS 11
Data handling CBSE PYTHON CLASS 11
 
Chapter 9 python fundamentals
Chapter 9 python fundamentalsChapter 9 python fundamentals
Chapter 9 python fundamentals
 
Python Session - 3
Python Session - 3Python Session - 3
Python Session - 3
 
Ground Gurus - Python Code Camp - Day 3 - Classes
Ground Gurus - Python Code Camp - Day 3 - ClassesGround Gurus - Python Code Camp - Day 3 - Classes
Ground Gurus - Python Code Camp - Day 3 - Classes
 
Python interview question for students
Python interview question for studentsPython interview question for students
Python interview question for students
 
Python45 2
Python45 2Python45 2
Python45 2
 
Chapter 10 data handling
Chapter 10 data handlingChapter 10 data handling
Chapter 10 data handling
 
Python programming msc(cs)
Python programming msc(cs)Python programming msc(cs)
Python programming msc(cs)
 
11 Unit 1 Chapter 02 Python Fundamentals
11  Unit 1 Chapter 02 Python Fundamentals11  Unit 1 Chapter 02 Python Fundamentals
11 Unit 1 Chapter 02 Python Fundamentals
 
Python revision tour i
Python revision tour iPython revision tour i
Python revision tour i
 
The Awesome Python Class Part-4
The Awesome Python Class Part-4The Awesome Python Class Part-4
The Awesome Python Class Part-4
 
Python Data Types
Python Data TypesPython Data Types
Python Data Types
 
Introduction To Programming with Python Lecture 2
Introduction To Programming with Python Lecture 2Introduction To Programming with Python Lecture 2
Introduction To Programming with Python Lecture 2
 
Introduction to Python
Introduction to Python Introduction to Python
Introduction to Python
 
Python revision tour II
Python revision tour IIPython revision tour II
Python revision tour II
 
Frequently asked tcs technical interview questions and answers
Frequently asked tcs technical interview questions and answersFrequently asked tcs technical interview questions and answers
Frequently asked tcs technical interview questions and answers
 
Python Session - 2
Python Session - 2Python Session - 2
Python Session - 2
 
C programming session 11
C programming session 11C programming session 11
C programming session 11
 
Python second ppt
Python second pptPython second ppt
Python second ppt
 
Python breakdown-workbook
Python breakdown-workbookPython breakdown-workbook
Python breakdown-workbook
 

Ähnlich wie Python Tutorial Questions part-1

Python (Data Analysis) cleaning and visualize
Python (Data Analysis) cleaning and visualizePython (Data Analysis) cleaning and visualize
Python (Data Analysis) cleaning and visualizeIruolagbePius
 
Introduction to Python for Data Science and Machine Learning
Introduction to Python for Data Science and Machine Learning Introduction to Python for Data Science and Machine Learning
Introduction to Python for Data Science and Machine Learning ParrotAI
 
Interview-level-QA-on-Python-Programming.pdf
Interview-level-QA-on-Python-Programming.pdfInterview-level-QA-on-Python-Programming.pdf
Interview-level-QA-on-Python-Programming.pdfExaminationSectionMR
 
Zero to Hero - Introduction to Python3
Zero to Hero - Introduction to Python3Zero to Hero - Introduction to Python3
Zero to Hero - Introduction to Python3Chariza Pladin
 
Basic data types in python
Basic data types in pythonBasic data types in python
Basic data types in pythonsunilchute1
 
Python (3).pdf
Python (3).pdfPython (3).pdf
Python (3).pdfsamiwaris2
 
Python - Module 1.ppt
Python - Module 1.pptPython - Module 1.ppt
Python - Module 1.pptjaba kumar
 
Top Most Python Interview Questions.pdf
Top Most Python Interview Questions.pdfTop Most Python Interview Questions.pdf
Top Most Python Interview Questions.pdfDatacademy.ai
 
Improve Your Edge on Machine Learning - Day 1.pptx
Improve Your Edge on Machine Learning - Day 1.pptxImprove Your Edge on Machine Learning - Day 1.pptx
Improve Your Edge on Machine Learning - Day 1.pptxCatherineVania1
 
FDP-faculty deveopmemt program on python
FDP-faculty deveopmemt program on pythonFDP-faculty deveopmemt program on python
FDP-faculty deveopmemt program on pythonkannikadg
 
python ppt | Python Course In Ghaziabad | Scode Network Institute
python ppt | Python Course In Ghaziabad | Scode Network Institutepython ppt | Python Course In Ghaziabad | Scode Network Institute
python ppt | Python Course In Ghaziabad | Scode Network InstituteScode Network Institute
 
L6 - Loops.pptx
L6 - Loops.pptxL6 - Loops.pptx
L6 - Loops.pptxEloAOgardo
 
L6 - Loops.pptx
L6 - Loops.pptxL6 - Loops.pptx
L6 - Loops.pptxEloAOgardo
 

Ähnlich wie Python Tutorial Questions part-1 (20)

Python (Data Analysis) cleaning and visualize
Python (Data Analysis) cleaning and visualizePython (Data Analysis) cleaning and visualize
Python (Data Analysis) cleaning and visualize
 
Introduction to Python for Data Science and Machine Learning
Introduction to Python for Data Science and Machine Learning Introduction to Python for Data Science and Machine Learning
Introduction to Python for Data Science and Machine Learning
 
Python 3.pptx
Python 3.pptxPython 3.pptx
Python 3.pptx
 
Interview-level-QA-on-Python-Programming.pdf
Interview-level-QA-on-Python-Programming.pdfInterview-level-QA-on-Python-Programming.pdf
Interview-level-QA-on-Python-Programming.pdf
 
Zero to Hero - Introduction to Python3
Zero to Hero - Introduction to Python3Zero to Hero - Introduction to Python3
Zero to Hero - Introduction to Python3
 
Basic data types in python
Basic data types in pythonBasic data types in python
Basic data types in python
 
Python (3).pdf
Python (3).pdfPython (3).pdf
Python (3).pdf
 
Python - Module 1.ppt
Python - Module 1.pptPython - Module 1.ppt
Python - Module 1.ppt
 
INTERNSHIP REPORT.docx
 INTERNSHIP REPORT.docx INTERNSHIP REPORT.docx
INTERNSHIP REPORT.docx
 
Top Most Python Interview Questions.pdf
Top Most Python Interview Questions.pdfTop Most Python Interview Questions.pdf
Top Most Python Interview Questions.pdf
 
UNIT1Lesson 2.pptx
UNIT1Lesson 2.pptxUNIT1Lesson 2.pptx
UNIT1Lesson 2.pptx
 
Improve Your Edge on Machine Learning - Day 1.pptx
Improve Your Edge on Machine Learning - Day 1.pptxImprove Your Edge on Machine Learning - Day 1.pptx
Improve Your Edge on Machine Learning - Day 1.pptx
 
Python Course.docx
Python Course.docxPython Course.docx
Python Course.docx
 
Python cheat-sheet
Python cheat-sheetPython cheat-sheet
Python cheat-sheet
 
FDP-faculty deveopmemt program on python
FDP-faculty deveopmemt program on pythonFDP-faculty deveopmemt program on python
FDP-faculty deveopmemt program on python
 
Python Guide.pptx
Python Guide.pptxPython Guide.pptx
Python Guide.pptx
 
Structured Languages
Structured LanguagesStructured Languages
Structured Languages
 
python ppt | Python Course In Ghaziabad | Scode Network Institute
python ppt | Python Course In Ghaziabad | Scode Network Institutepython ppt | Python Course In Ghaziabad | Scode Network Institute
python ppt | Python Course In Ghaziabad | Scode Network Institute
 
L6 - Loops.pptx
L6 - Loops.pptxL6 - Loops.pptx
L6 - Loops.pptx
 
L6 - Loops.pptx
L6 - Loops.pptxL6 - Loops.pptx
L6 - Loops.pptx
 

Mehr von Srinimf-Slides

software-life-cycle.pptx
software-life-cycle.pptxsoftware-life-cycle.pptx
software-life-cycle.pptxSrinimf-Slides
 
Cics testing and debugging-session 7
Cics testing and debugging-session 7Cics testing and debugging-session 7
Cics testing and debugging-session 7Srinimf-Slides
 
CICS error and exception handling-recovery and restart-session 6
CICS error and exception handling-recovery and restart-session 6CICS error and exception handling-recovery and restart-session 6
CICS error and exception handling-recovery and restart-session 6Srinimf-Slides
 
Cics program, interval and task control commands-session 5
Cics program, interval and task control commands-session 5Cics program, interval and task control commands-session 5
Cics program, interval and task control commands-session 5Srinimf-Slides
 
Cics data access-session 4
Cics data access-session 4Cics data access-session 4
Cics data access-session 4Srinimf-Slides
 
CICS basic mapping support - session 3
CICS basic mapping support - session 3CICS basic mapping support - session 3
CICS basic mapping support - session 3Srinimf-Slides
 
Cics application programming - session 2
Cics   application programming - session 2Cics   application programming - session 2
Cics application programming - session 2Srinimf-Slides
 
CICS basics overview session-1
CICS basics overview session-1CICS basics overview session-1
CICS basics overview session-1Srinimf-Slides
 
The best Teradata RDBMS introduction a quick refresher
The best Teradata RDBMS introduction a quick refresherThe best Teradata RDBMS introduction a quick refresher
The best Teradata RDBMS introduction a quick refresherSrinimf-Slides
 
The best ETL questions in a nut shell
The best ETL questions in a nut shellThe best ETL questions in a nut shell
The best ETL questions in a nut shellSrinimf-Slides
 
IMS DC Self Study Complete Tutorial
IMS DC Self Study Complete TutorialIMS DC Self Study Complete Tutorial
IMS DC Self Study Complete TutorialSrinimf-Slides
 
How To Master PACBASE For Mainframe In Only Seven Days
How To Master PACBASE For Mainframe In Only Seven DaysHow To Master PACBASE For Mainframe In Only Seven Days
How To Master PACBASE For Mainframe In Only Seven DaysSrinimf-Slides
 
Assembler Language Tutorial for Mainframe Programmers
Assembler Language Tutorial for Mainframe ProgrammersAssembler Language Tutorial for Mainframe Programmers
Assembler Language Tutorial for Mainframe ProgrammersSrinimf-Slides
 
The Easytrieve Presention by Srinimf
The Easytrieve Presention by SrinimfThe Easytrieve Presention by Srinimf
The Easytrieve Presention by SrinimfSrinimf-Slides
 
Writing command macro in stratus cobol
Writing command macro in stratus cobolWriting command macro in stratus cobol
Writing command macro in stratus cobolSrinimf-Slides
 
PLI Presentation for Mainframe Programmers
PLI Presentation for Mainframe ProgrammersPLI Presentation for Mainframe Programmers
PLI Presentation for Mainframe ProgrammersSrinimf-Slides
 
PL/SQL Interview Questions
PL/SQL Interview QuestionsPL/SQL Interview Questions
PL/SQL Interview QuestionsSrinimf-Slides
 

Mehr von Srinimf-Slides (20)

software-life-cycle.pptx
software-life-cycle.pptxsoftware-life-cycle.pptx
software-life-cycle.pptx
 
Cics testing and debugging-session 7
Cics testing and debugging-session 7Cics testing and debugging-session 7
Cics testing and debugging-session 7
 
CICS error and exception handling-recovery and restart-session 6
CICS error and exception handling-recovery and restart-session 6CICS error and exception handling-recovery and restart-session 6
CICS error and exception handling-recovery and restart-session 6
 
Cics program, interval and task control commands-session 5
Cics program, interval and task control commands-session 5Cics program, interval and task control commands-session 5
Cics program, interval and task control commands-session 5
 
Cics data access-session 4
Cics data access-session 4Cics data access-session 4
Cics data access-session 4
 
CICS basic mapping support - session 3
CICS basic mapping support - session 3CICS basic mapping support - session 3
CICS basic mapping support - session 3
 
Cics application programming - session 2
Cics   application programming - session 2Cics   application programming - session 2
Cics application programming - session 2
 
CICS basics overview session-1
CICS basics overview session-1CICS basics overview session-1
CICS basics overview session-1
 
100 sql queries
100 sql queries100 sql queries
100 sql queries
 
The best Teradata RDBMS introduction a quick refresher
The best Teradata RDBMS introduction a quick refresherThe best Teradata RDBMS introduction a quick refresher
The best Teradata RDBMS introduction a quick refresher
 
The best ETL questions in a nut shell
The best ETL questions in a nut shellThe best ETL questions in a nut shell
The best ETL questions in a nut shell
 
IMS DC Self Study Complete Tutorial
IMS DC Self Study Complete TutorialIMS DC Self Study Complete Tutorial
IMS DC Self Study Complete Tutorial
 
How To Master PACBASE For Mainframe In Only Seven Days
How To Master PACBASE For Mainframe In Only Seven DaysHow To Master PACBASE For Mainframe In Only Seven Days
How To Master PACBASE For Mainframe In Only Seven Days
 
Assembler Language Tutorial for Mainframe Programmers
Assembler Language Tutorial for Mainframe ProgrammersAssembler Language Tutorial for Mainframe Programmers
Assembler Language Tutorial for Mainframe Programmers
 
The Easytrieve Presention by Srinimf
The Easytrieve Presention by SrinimfThe Easytrieve Presention by Srinimf
The Easytrieve Presention by Srinimf
 
Writing command macro in stratus cobol
Writing command macro in stratus cobolWriting command macro in stratus cobol
Writing command macro in stratus cobol
 
PLI Presentation for Mainframe Programmers
PLI Presentation for Mainframe ProgrammersPLI Presentation for Mainframe Programmers
PLI Presentation for Mainframe Programmers
 
PL/SQL Interview Questions
PL/SQL Interview QuestionsPL/SQL Interview Questions
PL/SQL Interview Questions
 
Macro teradata
Macro teradataMacro teradata
Macro teradata
 
DB2-SQL Part-2
DB2-SQL Part-2DB2-SQL Part-2
DB2-SQL Part-2
 

Kürzlich hochgeladen

presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 

Kürzlich hochgeladen (20)

presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 

Python Tutorial Questions part-1

  • 1. Python Questions & Answers Tutorial Part-1 Q.1. What is the role of keywords in Python language? List keywords provided by Python​. A) The Keywords in Python you can say as reserved words. All keywords are with Small case. Only 3 keywords are not Small case. Those are True, False and None and False nonlocal as finally not assert for or break from pass class global raise continue if return def import True del in try elif is while else lambda with except None yield Q.2. What is an identifier? How will you differentiate it from a variable? A). Identifier is an user defined variable. This can be name given to Function, Class, and Variable by user. The length can be any length. It cannot start with numbers. And, it cannot contain special chars. Q.3. what is a variable? State the rules used to define a variable in Python language. A). It is an user-defined variable. Basically it indicates a data-type. In Python, you can define dynamically where you want. The data type it assigns dynamically according to value you assigned to a variable. Example Char or Int
  • 2. Q.4. Why documentation is necessary in a language? How documentation can be performed in Python? A). In Python, to make developer understand the logic, in the middle, you can write comments. These comments start with ‘#’. This is called documentation. Q.5. Explain the significance of data types in Python language? A). The value you assigned to a variable defined by you, says that, that particular type applies to that variable. Python supports 7 data types – Number, String, List, Tuple, Set, Dictionary and File Q.6. Identify the data type that appropriately describes the data given below: a. 32.e10 ​➔​ Complex b. -8.56e100 ​➔​ Float c. 34.j ​➔​ Complex d. -876 ​➔​ Int e. 432 ​➔​ Int f. 4375457L ​➔​ Long Q.7. List all the data types provided by Python language. int long float complex 50 3682936L 4.3 5.78j 555 -0X5789L 56.28 .863j -897 0231L -87.32 30+29J -1976 0XDE567AFE -56.27e10 4.24e-8j -936 -2467896435L 71.e19 45.j Q.8. How will you distinguish list and tuple data types? List - is like an array a= [1,2,3,4,5,6] Tuple - But it is immutable. That means data in a tuple is write protected. Data in a tuple is written using parenthesis and commas Q.9. Differentiate between set and dictionary data type in Python. Set is an unordered collection of unique items. a = {15, 20, 13, 45, 67}
  • 3. Q.10. Explain all the data types provided by Python language with appropriate illustrations. Number, String, List, Tuple, Set, Dictionary and File Example for Dictionary: dict2 = {'name': 'Smith', 'code': 1234, 'dept':'HR'} Dictionary is an unordered collection of key value pairs. The file data type is used in Python to store and work with files on the computer or on the Internet​. Q.11. What is a slicing operator? How can you use it? Illustrate. Python slicing is to extract part of string from your main string. This concept is called unstring in COBOL. Q.12. How can a user interact with the Python interpreter? A). By typing ‘python’ on Linux, you can enter into python interpreter. >>> Q.13. Signify the role of input and output functions provided by Python language. A). You can interact by using input() and print() functions. Input is to get input from user. Print is for output. 14. How will you format the output in Python? A). Output(), you can see many formats those you can use to display ● Print(‘ I am in output’, a) ● Print(‘I am {0} in output’.format(‘first’,’second’) ● Using format symbols Q​.15. Elaborate the significance of import command in Python with a suitable example. A). The import command you can use to import your’.py’ module into python interpreter.