0% found this document useful (0 votes)
33 views12 pages

FPL 1 Lecture - Copy-1

Uploaded by

m.abdullah.pk68
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
33 views12 pages

FPL 1 Lecture - Copy-1

Uploaded by

m.abdullah.pk68
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 12

AQSA

Department BSCS
Programming Fundamental
Semester 1st
Lab #1
Topic :Integrated Development Environment
Built-in library
An Integrated Development Environment (IDE) is a comprehensive software
suite that provides developers with tools to write, test, debug, and manage
code efficiently. The goal of an IDE is to simplify the software development
process by bringing all essential tools together in one place, making it easier
to create, modify, and maintain software projects
• Code Editor
• Purpose: The code editor is where developers write and edit their code.
• Features: Most code editors in an IDE offer features like:
– Syntax highlighting: Colors are applied to different elements of the code
(keywords, variables, functions) for easy readability.
– Autocomplete: Suggests completions for variables, methods, or function
names based on what has already been written.
– Code formatting: Some IDEs automatically format code according to
coding standards.
• Debugger
• Purpose: A tool that helps developers find and fix errors (bugs) in their code.
• Features:
– Breakpoints: Stop execution at certain points in the code to inspect the
program state.
– Step through code: Execute code one line at a time to observe how it behaves.
– Variable inspection: Examine the values of variables at different stages of
execution.
• Build Automation Tools
• Purpose: These tools help automate repetitive tasks like compiling the
code, running tests, or packaging the software for release.
• Examples: Tools like Maven for Java, Gradle, or Makefiles in C/C++ allow
for automated builds and dependency management.
• A Version Control Integration
• Purpose: Manage changes to your codebase and collaborate with other
developers.
• Features:
– Version tracking: Keep track of different versions of the code, making it easy
to revert to an earlier state if needed.
– Collaboration: Supports collaboration through platforms like Git, GitHub,
GitLab, and Bitbucket, where multiple developers can work on the same
project simultaneously.
• Testing Tools
• Purpose: Help ensure the software works as expected by running tests.
• Features:
– Unit testing: Test individual components or functions of the software.
– Integration testing: Test how different parts of the software work
together.
Project Management Tools :
• Purpose: Organize and manage the files and resources of a software project.
• Features:
– File explorer: Provides a visual structure of the project files and folders.
– Configuration management: Manage build configurations for different
environments (e.g., development, testing, production).
Advantages of Using an IDE:
• Efficiency: Having all tools in one place saves time and effort.
• Consistency: IDEs often enforce best practices, making your code more consistent.
• Debugging ease: Built-in tools make finding and fixing bugs much faster.
• Collaboration: Integrated version control makes working in teams more
streamlined.
• Disadvantages:
• Learning curve: Some IDEs have many features, which can be overwhelming for
beginners.
• Performance: Some full-featured IDEs can be resource-heavy, leading to slower
performance on less powerful machines.
Advantages of Using an IDE:
Efficiency: Having all tools in one place saves time and effort.
Consistency: IDEs often enforce best practices, making your code
more consistent.
Debugging ease: Built-in tools make finding and fixing bugs much
faster.
Collaboration: Integrated version control makes working in teams
more streamlined.
Disadvantages:
Learning curve: Some IDEs have many features, which can be
overwhelming for beginners.
Performance: Some full-featured IDEs can be resource-heavy,
leading to slower performance on less powerful machines
Creating a Python File
IDE/Editor: Open your preferred IDE (e.g., Visual Studio Code, PyCharm, or
Sublime Text).
Steps:
•Click on File -> New File.
•Write your Python code.
•Save the file with a .py extension, such as my_script.py
print("Hello, World!")

Saving a Python File


•IDE/Editor: While you write your code, you can save it to avoid losing progress.
•Steps:
•Click File -> Save As or simply press Ctrl+S (Windows) or Cmd+S (Mac).

Updating a Python File


•Open the saved .py file in your IDE or text editor.
•Make changes or updates to the code.
•name = input("Enter your name: ")
• print(f"Hello, {name}!")
Compiling a Python File
• Python is an interpreted language, which means it doesn’t require explicit compilation like C++ or
Java. However, the Python interpreter converts your code into bytecode and then executes it.
• Steps:
– Open a terminal or use the built-in terminal of your IDE.
– Navigate to the directory where your Python file is saved.
– Run the Python file using the command
python my_script.py
Debugging a Python File
•Most modern IDEs come with a built-in debugger to help you find errors in your code.
•Steps in VS Code or PyCharm
•Set breakpoints: Click next to the line number where you want the execution to pause.
•Start debugging: Click the debug icon or go to Run -> Start Debugging (F5).
•Inspect variables, check the flow of execution, and step through the code line by line.
•Key Debugging Features:
•Breakpoints: Pause the code execution at a specific line.
•Step into/Step over: Execute your code one line at a time to see what's
happening at each step.
•Watch Variables: Inspect the value of variables during execution.
Python: History and Introduction
Python is a high-level, general-purpose programming language
known for its simplicity, readability, and versatility. It has grown
to become one of the most popular programming languages due
to its ease of use and wide range of applications, from web
development to data science and artificial intelligence (AI).
History of Python
Creator: Python was created by Guido van Rossum in the late
1980s, with the first version being released in 1991. Van Rossum
worked at the Centrum Wiskunde & Informatica (CWI) in the
Netherlands
. when he started developing Python as a hobby
project.
Python keywords are reserved words in Python that have special
meanings and are part of the syntax. These words cannot be used
as identifiers (such as variable names, function names, etc.).
False
• Represents the Boolean value for false
• is_active = False
True
•Represents the Boolean value for true .

.
SUM
num1=int(input("Enter first number:")
num2=int (input ("Enter second number:")
sum=num1+num2
print("The sum is:",sum)

You might also like