The document provides instructions for downloading and installing Python and PyCharm on Mac and Windows systems. It outlines the steps to download each program from their respective websites, then guides the user through installing Python and PyCharm on their device by navigating folders and clicking through installation windows. It also briefly introduces some basic programming concepts that will be covered in an upcoming Python tutorial, such as variables, data types, conditional statements, and loops.
Python is a general purpose programming language created by Guido van Rossum in 1991. It is an interpreted, interactive, object-oriented language with a simple syntax. Python supports cross-platform development and is widely used for scripting, game development, and building desktop and mobile applications. To use Python, developers must download the Python interpreter and can write and run code using the interactive shell or integrated development environments like IDLE. The document then discusses Python's multi-paradigm programming style, advantages like rapid development, and how to install Python and write basic programs using variables, operators, and data types.
The document provides an overview of the Python programming language. It discusses that Python is an easy to learn, high-level, open-source programming language. It describes Python's design philosophy of code readability and how it allows programmers to express concepts in fewer lines of code compared to languages like C++ and Java. The document also discusses Python's powerful libraries, wide use across industries, and how to get started with Python programming using the IDLE integrated development environment.
Boost your career with Python Programming Language at SSDN Technologies in Gurgaon. In this training you learn about Python basic to advance concept by industry expert. Register Now !!
This document provides an overview of Python programming concepts including what Python is, variables, data types, operators, conditional statements, loops, functions, exceptions, lists, dictionaries, tuples and more. Some key points covered include:
- Python is an interpreted, object-oriented programming language that can be used for many different application types.
- Variables, constants, operators, and control flow structures like conditionals and loops are introduced as the basic building blocks of Python programs.
- Common data types like strings, lists, dictionaries and tuples are described along with their characteristics and functions.
- Other concepts explained are functions, exceptions, formatting, modules and more.
This document discusses key concepts in Python programming including data types, operators, strings, modules, object-oriented programming, and connecting to SQLite databases. It provides examples of numeric, boolean, and sequence data types. It also demonstrates various math operators, string operators like concatenation and multiplication, and how to import and use modules. Object-oriented concepts like classes, attributes, and behaviors are explained using a parrot example. Finally, it mentions how to connect a SQLite database to Python code using the MySQLdb interface.
Python is a general purpose programming language created by Guido van Rossum in 1991. It is designed to be simple, powerful, and has an easy to read syntax. Python supports cross-platform development and code can run on Windows, Linux, and Mac OS. It is widely used for tasks such as desktop applications, web development, data analysis, and game development. To use Python, one must download the Python interpreter from python.org and then write and run Python code using the interactive shell or IDEs like IDLE. Python code makes use of variables, data types, operators, conditionals, loops, functions, classes and modules. Common data types in Python include integers, floats, strings, lists, tuples, and
The document discusses input and output in Java using the java.io package. It provides examples of reading keyboard input using BufferedReader and reading file input using FileReader. It also provides examples of writing console output using System.out and writing to files using PrintWriter. The document explains that java.io streams provide independence from the source or destination of the input/output.
Python is a general purpose programming language created by Guido van Rossum in 1991. It is an interpreted, interactive, object-oriented language with a simple syntax. Python supports cross-platform development and is widely used for scripting, game development, and building desktop and mobile applications. To use Python, developers must download the Python interpreter and can write and run code using the interactive shell or integrated development environments like IDLE. The document then discusses Python's multi-paradigm programming style, advantages like rapid development, and how to install Python and write basic programs using variables, operators, and data types.
The document provides an overview of the Python programming language. It discusses that Python is an easy to learn, high-level, open-source programming language. It describes Python's design philosophy of code readability and how it allows programmers to express concepts in fewer lines of code compared to languages like C++ and Java. The document also discusses Python's powerful libraries, wide use across industries, and how to get started with Python programming using the IDLE integrated development environment.
Boost your career with Python Programming Language at SSDN Technologies in Gurgaon. In this training you learn about Python basic to advance concept by industry expert. Register Now !!
This document provides an overview of Python programming concepts including what Python is, variables, data types, operators, conditional statements, loops, functions, exceptions, lists, dictionaries, tuples and more. Some key points covered include:
- Python is an interpreted, object-oriented programming language that can be used for many different application types.
- Variables, constants, operators, and control flow structures like conditionals and loops are introduced as the basic building blocks of Python programs.
- Common data types like strings, lists, dictionaries and tuples are described along with their characteristics and functions.
- Other concepts explained are functions, exceptions, formatting, modules and more.
This document discusses key concepts in Python programming including data types, operators, strings, modules, object-oriented programming, and connecting to SQLite databases. It provides examples of numeric, boolean, and sequence data types. It also demonstrates various math operators, string operators like concatenation and multiplication, and how to import and use modules. Object-oriented concepts like classes, attributes, and behaviors are explained using a parrot example. Finally, it mentions how to connect a SQLite database to Python code using the MySQLdb interface.
Python is a general purpose programming language created by Guido van Rossum in 1991. It is designed to be simple, powerful, and has an easy to read syntax. Python supports cross-platform development and code can run on Windows, Linux, and Mac OS. It is widely used for tasks such as desktop applications, web development, data analysis, and game development. To use Python, one must download the Python interpreter from python.org and then write and run Python code using the interactive shell or IDEs like IDLE. Python code makes use of variables, data types, operators, conditionals, loops, functions, classes and modules. Common data types in Python include integers, floats, strings, lists, tuples, and
The document discusses input and output in Java using the java.io package. It provides examples of reading keyboard input using BufferedReader and reading file input using FileReader. It also provides examples of writing console output using System.out and writing to files using PrintWriter. The document explains that java.io streams provide independence from the source or destination of the input/output.
Python is an interpreted, object-oriented, high-level programming language with dynamic semantics. It was created by Guido van Rossum in 1991 and named after the BBC show Monty Python's Flying Circus. Python is used for web development, data analysis, scientific computing, and more. It has a simple syntax and is highly readable. Key features of Python include object orientation, dynamic typing, automatic memory management, and a large standard library. Common uses of Python include data science, web development, education, systems administration, and more. Major companies that use Python include Google, Facebook, NASA, and Netflix.
This document provides an agenda and overview for a Python tutorial presented over multiple sessions. The first session introduces Python and demonstrates how to use the Python interpreter. The second session covers basic Python data structures like lists, modules, input/output, and exceptions. An optional third session discusses unit testing. The document explains that Python is an easy to learn yet powerful programming language that supports object-oriented programming and high-level data structures in an interpreted, dynamic environment.
This document provides an overview of Java input-output (I/O) streams and classes. It discusses the core stream classes like InputStream, OutputStream, Reader, Writer and their subclasses like FileInputStream, FileOutputStream, FileReader, FileWriter. It also covers buffered stream classes like BufferedInputStream, BufferedOutputStream, BufferedReader, BufferedWriter which provide better performance. Examples are given to demonstrate reading, writing and file handling using these stream classes.
Object-oriented programming Undergraduate Course Presentations
java.io streams and files in Java
University of Vale do Itajaí
Univali
Incremental Tecnologia
English version
- Java performs I/O through streams which are abstractions that produce or consume data and are linked to physical devices.
- There are two types of streams in Java: byte streams which handle input/output of bytes and character streams which handle input/output of characters more efficiently.
- The main classes for byte streams are InputStream, OutputStream and their subclasses like FileInputStream and FileOutputStream. The main classes for character streams are Reader and Writer.
- The predefined streams System.in, System.out and System.err represent standard input, standard output and standard error streams in Java.
This document discusses Java I/O and streams. It begins by introducing files and the File class, which provides methods for obtaining file properties and manipulating files. It then discusses reading and writing files using byte streams like FileInputStream and FileOutputStream. Character streams like PrintWriter and BufferedReader are presented for console I/O. Other stream classes covered include buffered streams, object streams for serialization, and data streams for primitive types. The key methods of various stream classes are listed.
The document discusses various input and output stream classes in Java. It defines streams as an abstraction that produces or consumes information linked to an I/O device. There are two types of streams - byte streams that handle binary data using classes like InputStream and OutputStream, and character streams that handle text using classes like Reader and Writer. The Java I/O package defines hierarchies for these stream classes, with subclasses that handle specific I/O devices or add functionality like buffering or filtering.
Python is an interpreted, open source programming language that is simple, powerful, and preinstalled on many systems. It has less syntax than other languages and a plethora of penetration testing tools have already been created in Python. Python code is translated and executed by an interpreter one statement at a time, allowing it to be run from the command prompt, through command prompt files, or in an integrated development environment. The language uses whitespace and comments to make code more readable. It can perform basic operations like printing, taking user input, performing conditionals and loops, defining reusable functions, and importing additional modules.
This document provides an introduction to .NET and Core C# programming. It discusses the .NET Framework, Common Language Infrastructure (CLI), Common Type System (CTS), Common Language Specification (CLS), and Common Intermediate Language (CIL). It also covers Mono, building and running C# applications on different platforms, and using various IDEs like Visual Studio.
Kunal Chauhan will be conducting a 6 week Python training program from May 15th to June 26th. The training will cover introductory Python programming, basics of programming in Python including variables, data types, operators, and control flow, principles of object-oriented programming, SQLite database usage, GUI development with PyQt, and applications of Python in various disciplines like web development, machine learning, data science, and more.
The document discusses character stream classes in Java. Character streams handle data in a human-readable character form, as opposed to byte streams which handle binary data. The main character stream classes are Reader and Writer, which are abstract classes. FileReader and FileWriter are concrete subclasses that allow reading from and writing to files.
This document provides an overview and agenda for a Java introduction presentation. It covers topics like the types of programming languages, what Java is and why it was developed, how to set up your environment to write Java programs, the basics of the Java language including variables, types, operators, methods, conditionals, loops, arrays, and object-oriented programming concepts. It also discusses how to write a first simple Java program and solve problems using Java.
The document provides an overview of file handling in C++. It discusses key concepts such as streams, file types (text and binary), opening and closing files, file modes, input/output operations, and file pointers. Functions for reading and writing to text files include put(), get(), and getline(). Binary files use write() and read() functions. File pointers can be manipulated using seekg(), seekp(), tellg(), and tellp() to move through files.
C++ is an object-oriented programming language that is an extension of C. It was created in 1979 and has undergone several revisions. C++ allows for faster development time and easier memory management compared to C due to features like code reuse, new data types, and object-oriented programming. The document provides an overview of C++ including its history, differences from C, program structure, data types, variables, input/output, and integrated development environments.
This document provides an introduction and overview of the Python programming language. It discusses that Python was created by Guido Van Rossum in 1991 and named after Monty Python. Python can be used for both procedural and object-oriented programming approaches. It is an interpreted language that is free to use, easy to learn, and has a simple syntax. Python is popular for web development, data analysis, science/engineering, and more. The document then covers Python syntax and provides examples of using variables, data types, and the interactive mode versus script mode of writing Python code.
This document provides an overview of the Python programming language. It discusses Python's history, features, and why it is a good programming language. Key points covered include:
- Python was created in the late 1980s and draws from many other languages.
- It is an open source, interpreted, object-oriented, and portable language with a large online community and library support.
- Python code is compiled to bytecode for performance. It has dynamic typing, automatic memory management, and is powerful yet easy to learn.
- The document reviews Python statements, expressions, variables, basic data types, functions, modules and exceptions. It provides examples of Python code.
Python is a popular programming language. It was created by Guido van Rossum, and released in 1991.
It is used for:
- web development (server-side),
- software development,
- mathematics,
- system scripting.
What can Python do?
Python can be used on a server to create web applications.
Python can be used alongside software to create workflows.
Python can connect to database systems. It can also read and modify files.
Python can be used to handle big data and perform complex mathematics.
Python can be used for rapid prototyping, or for production-ready software development.
- Why Python?
Python works on different platforms (Windows, Mac, Linux, Raspberry Pi, etc).
Python has a simple syntax similar to the English language.
Python has syntax that allows developers to write programs with fewer lines than some other programming languages.
Python runs on an interpreter system, meaning that code can be executed as soon as it is written. This means that prototyping can be very quick.
Python can be treated in a procedural way, an object-oriented way or a functional way.
- what we learn:
1- Python Install.
2- Python Comments.
3- Python Variables.
4- Python Data Types.
5- Python Numbers.
- The document discusses Python programming concepts such as data types, variables, operators, and syntax. It provides examples of Python code for variables, comments, strings, numbers, and more.
- Python is a popular programming language used for web development, software development, mathematics, and more. It runs on different platforms and has a simple, readable syntax.
- Key features of Python include dynamic typing, automatic memory management, and an intuitive syntax that uses indentation rather than brackets.
Python is an interpreted, object-oriented, high-level programming language with dynamic semantics. It was created by Guido van Rossum in 1991 and named after the BBC show Monty Python's Flying Circus. Python is used for web development, data analysis, scientific computing, and more. It has a simple syntax and is highly readable. Key features of Python include object orientation, dynamic typing, automatic memory management, and a large standard library. Common uses of Python include data science, web development, education, systems administration, and more. Major companies that use Python include Google, Facebook, NASA, and Netflix.
This document provides an agenda and overview for a Python tutorial presented over multiple sessions. The first session introduces Python and demonstrates how to use the Python interpreter. The second session covers basic Python data structures like lists, modules, input/output, and exceptions. An optional third session discusses unit testing. The document explains that Python is an easy to learn yet powerful programming language that supports object-oriented programming and high-level data structures in an interpreted, dynamic environment.
This document provides an overview of Java input-output (I/O) streams and classes. It discusses the core stream classes like InputStream, OutputStream, Reader, Writer and their subclasses like FileInputStream, FileOutputStream, FileReader, FileWriter. It also covers buffered stream classes like BufferedInputStream, BufferedOutputStream, BufferedReader, BufferedWriter which provide better performance. Examples are given to demonstrate reading, writing and file handling using these stream classes.
Object-oriented programming Undergraduate Course Presentations
java.io streams and files in Java
University of Vale do Itajaí
Univali
Incremental Tecnologia
English version
- Java performs I/O through streams which are abstractions that produce or consume data and are linked to physical devices.
- There are two types of streams in Java: byte streams which handle input/output of bytes and character streams which handle input/output of characters more efficiently.
- The main classes for byte streams are InputStream, OutputStream and their subclasses like FileInputStream and FileOutputStream. The main classes for character streams are Reader and Writer.
- The predefined streams System.in, System.out and System.err represent standard input, standard output and standard error streams in Java.
This document discusses Java I/O and streams. It begins by introducing files and the File class, which provides methods for obtaining file properties and manipulating files. It then discusses reading and writing files using byte streams like FileInputStream and FileOutputStream. Character streams like PrintWriter and BufferedReader are presented for console I/O. Other stream classes covered include buffered streams, object streams for serialization, and data streams for primitive types. The key methods of various stream classes are listed.
The document discusses various input and output stream classes in Java. It defines streams as an abstraction that produces or consumes information linked to an I/O device. There are two types of streams - byte streams that handle binary data using classes like InputStream and OutputStream, and character streams that handle text using classes like Reader and Writer. The Java I/O package defines hierarchies for these stream classes, with subclasses that handle specific I/O devices or add functionality like buffering or filtering.
Python is an interpreted, open source programming language that is simple, powerful, and preinstalled on many systems. It has less syntax than other languages and a plethora of penetration testing tools have already been created in Python. Python code is translated and executed by an interpreter one statement at a time, allowing it to be run from the command prompt, through command prompt files, or in an integrated development environment. The language uses whitespace and comments to make code more readable. It can perform basic operations like printing, taking user input, performing conditionals and loops, defining reusable functions, and importing additional modules.
This document provides an introduction to .NET and Core C# programming. It discusses the .NET Framework, Common Language Infrastructure (CLI), Common Type System (CTS), Common Language Specification (CLS), and Common Intermediate Language (CIL). It also covers Mono, building and running C# applications on different platforms, and using various IDEs like Visual Studio.
Kunal Chauhan will be conducting a 6 week Python training program from May 15th to June 26th. The training will cover introductory Python programming, basics of programming in Python including variables, data types, operators, and control flow, principles of object-oriented programming, SQLite database usage, GUI development with PyQt, and applications of Python in various disciplines like web development, machine learning, data science, and more.
The document discusses character stream classes in Java. Character streams handle data in a human-readable character form, as opposed to byte streams which handle binary data. The main character stream classes are Reader and Writer, which are abstract classes. FileReader and FileWriter are concrete subclasses that allow reading from and writing to files.
This document provides an overview and agenda for a Java introduction presentation. It covers topics like the types of programming languages, what Java is and why it was developed, how to set up your environment to write Java programs, the basics of the Java language including variables, types, operators, methods, conditionals, loops, arrays, and object-oriented programming concepts. It also discusses how to write a first simple Java program and solve problems using Java.
The document provides an overview of file handling in C++. It discusses key concepts such as streams, file types (text and binary), opening and closing files, file modes, input/output operations, and file pointers. Functions for reading and writing to text files include put(), get(), and getline(). Binary files use write() and read() functions. File pointers can be manipulated using seekg(), seekp(), tellg(), and tellp() to move through files.
C++ is an object-oriented programming language that is an extension of C. It was created in 1979 and has undergone several revisions. C++ allows for faster development time and easier memory management compared to C due to features like code reuse, new data types, and object-oriented programming. The document provides an overview of C++ including its history, differences from C, program structure, data types, variables, input/output, and integrated development environments.
This document provides an introduction and overview of the Python programming language. It discusses that Python was created by Guido Van Rossum in 1991 and named after Monty Python. Python can be used for both procedural and object-oriented programming approaches. It is an interpreted language that is free to use, easy to learn, and has a simple syntax. Python is popular for web development, data analysis, science/engineering, and more. The document then covers Python syntax and provides examples of using variables, data types, and the interactive mode versus script mode of writing Python code.
This document provides an overview of the Python programming language. It discusses Python's history, features, and why it is a good programming language. Key points covered include:
- Python was created in the late 1980s and draws from many other languages.
- It is an open source, interpreted, object-oriented, and portable language with a large online community and library support.
- Python code is compiled to bytecode for performance. It has dynamic typing, automatic memory management, and is powerful yet easy to learn.
- The document reviews Python statements, expressions, variables, basic data types, functions, modules and exceptions. It provides examples of Python code.
Python is a popular programming language. It was created by Guido van Rossum, and released in 1991.
It is used for:
- web development (server-side),
- software development,
- mathematics,
- system scripting.
What can Python do?
Python can be used on a server to create web applications.
Python can be used alongside software to create workflows.
Python can connect to database systems. It can also read and modify files.
Python can be used to handle big data and perform complex mathematics.
Python can be used for rapid prototyping, or for production-ready software development.
- Why Python?
Python works on different platforms (Windows, Mac, Linux, Raspberry Pi, etc).
Python has a simple syntax similar to the English language.
Python has syntax that allows developers to write programs with fewer lines than some other programming languages.
Python runs on an interpreter system, meaning that code can be executed as soon as it is written. This means that prototyping can be very quick.
Python can be treated in a procedural way, an object-oriented way or a functional way.
- what we learn:
1- Python Install.
2- Python Comments.
3- Python Variables.
4- Python Data Types.
5- Python Numbers.
- The document discusses Python programming concepts such as data types, variables, operators, and syntax. It provides examples of Python code for variables, comments, strings, numbers, and more.
- Python is a popular programming language used for web development, software development, mathematics, and more. It runs on different platforms and has a simple, readable syntax.
- Key features of Python include dynamic typing, automatic memory management, and an intuitive syntax that uses indentation rather than brackets.
This document provides an introduction to Python programming language. It discusses what Python is, its features, applications, and how it compares to compiled languages in terms of compiling versus interpreting. It also covers installing Python, different Python environments like the Python shell, IDLE, Jupyter Notebook, and Anaconda. Basic Python concepts like variables, data types, operators, functions, modules, and math module commands are explained. The reader is instructed to install NumPy and SciPy using conda for the next lab and test the installations.
The document provides an introduction to Python programming, including details about Python's history, versions, data types, strings, and code execution. It discusses how to install Python and write basic programs. Key reasons for using Python are its object-oriented nature, readability, large standard library, cross-platform capabilities, and ease of use. The document also covers string methods and slicing, numeric data types, installing Python, and running code in interactive and script modes.
Basic concept of Python.pptx includes design tool, identifier, variables.supriyasarkar38
This document discusses Python programming concepts including data types, variables, operators, and functions. It provides examples of Python syntax for writing and executing code as well as built-in data types like strings, integers, and lists. Key concepts covered include variables, data type casting, comments, arithmetic and comparison operators, and functions.
This document provides an overview of C++ programming and processing a C++ program. It discusses the evolution of programming languages and how a C++ program is compiled from source code to machine code. The document also explains that a C++ program is run by using an editor to create source code, preprocessing it, compiling it to create an object program, linking the object program, loading the executable code into memory, and executing it.
web programming UNIT VIII python by Bhavsingh MalothBhavsingh Maloth
This document provides a tutorial on Python programming. It introduces core Python concepts over several sections. The first section discusses what will be covered, including an introduction to the Python language and becoming comfortable writing basic programs. Subsequent sections cover specific Python topics like data types, operators, conditional and loop execution, functions, modules and packages for code reusability. The document emphasizes consistent indentation and readability in Python code.
This document provides an outline for an introduction to programming with Python course. It covers installing Python, basic programs and numeric data types, control statements, text processing, and what students may learn next. Example programs and exercises are provided to illustrate key concepts like variables, conditionals, loops, strings, and more. The course aims to teach foundational programming concepts using the Python language.
Python can be used for a variety of applications including web development, scientific computing, education, desktop GUIs, and software development. It is commonly used to build web applications using frameworks like Django and Flask, for scientific computing tasks using libraries like NumPy and SciPy, and for general software development tasks like build automation and testing. Python supports a range of data types including integers, floats, complex numbers, lists, dictionaries, sets, and strings. It can be used to write functions and programs to solve problems across many domains.
Python is a general purpose programming language that can be used for web development, system administration, science and more. It is interpreted rather than compiled, and was created in the 1990s by Guido van Rossum to be highly readable. Python is widely used by companies like Google, YouTube, Intel and more due to its power, flexibility and readability. It supports key programming concepts like variables, conditionals, loops, lists, tuples and more.
python programming language Python is a high-level, interpreted, general-purpose programming language. Its design philosophy emphasizes code readability with the use of significant indentation. INTRODUCTION
HISTORY
USES OF PYTHON
FEATURES OF PYTHON
PYTHON PROJECT FOR BEGINNERS
PYTHON PROGRAM
KEY CHANGES IN PYTHON
BASIC SYNTAX
VARIABLE
NUMBERS
STANDARD TYPE HIERARCHY
STRING
CONDITIONALS
FOR LOOP
FUNCTION
KEYWORDS
WHY PYTHON ?
DIFFERENTIATE
EXAMPLES
Python is a general purpose programming language that can be used for both programming and scripting. It was created in the 1990s by Guido van Rossum. Python is an interpreted language that is free, powerful, and portable. It can be used for tasks like web development, data analysis, and system scripting. The document provides an overview of Python including its history, uses, data types like strings and lists, and basic programming concepts like variables, conditionals, and loops. It recommends Python as a principal teaching language due to its free and easy installation, flexibility, use in academia and industry, and ability to offer a more rapid and enjoyable learning experience for students.
This is an introduction to python ppt. This PPT has basic information about python. This may be first-class to the learner. It describes the fundamentals of python from history to basic programming skills. It allows the learner to learn how to start coding in python
Kosmik is the best institute for Python training in Hyderabad Kukatpally/KPHB. kosmik provides lab facilities with complete real-time training with live sessions
call now: +91-8712186898, +91-8179496603, +91-6309565721
This document provides an overview of the Python programming language. It begins by explaining what Python is, noting that it is a general purpose programming language that is often used for scripting. The key differences between program and scripting languages are then outlined. The history and creation of Python by Guido van Rossum are summarized, along with Python's scope in fields like science, system administration, and web development. Various uses of Python are listed, followed by who commonly uses Python today such as Google and YouTube. Reasons for Python's popularity include being free, powerful, and portable. The document concludes by covering installing Python, running and executing Python code, and some basic Python concepts like strings, variables, data types, and loops/
This document provides an overview of the Python programming language. It begins by explaining what Python is - a general purpose, interpreted programming language that can be used as both a programming and scripting language. It then discusses the differences between programs and scripting languages. The history and creator of Python, Guido van Rossum, are outlined. The document explores the scope of Python and what tasks it can be used for. Popular companies and industries that use Python today are listed. Reasons why people use Python, such as it being free, powerful, and portable, are provided. Instructions for installing Python and running Python code are included. The document covers Python code execution and introduces basic Python concepts like variables, strings, data types, lists
#Code2Create series: C++ is a powerful general-purpose programming language. It can be used to develop operating systems, browsers, games, and so on. C++ supports different ways of programming like procedural, object-oriented, functional, and so on.Start your programming journey and join us to learn C++ basics!
by Google Developers Group and Women Tech-markers Kuwait chapter:
Instagram and Twitter: @GDGWTMKUWAIT
#Code2Create:: Introduction to App Development in Flutter with DartGDGKuwaitGoogleDevel
This is an introductory workshop in Flutter with Dart. Through which attendees will learn to construct a mobile GUI application for Android and iOS devices using the latest tools and practices.
Objectives:
1. Use good graphical interface design principle to build a user interface
2. Code event procedures in a GUI program
3. Produce tested code that executes correctly and consistently
4. Ability to debug program using manual and programmatic tools
*Workshop level: Beginners, but must have programming background with any OOP language.
**Prerequisites: In order to participate in this workshop, you need:
- a laptop with Android Studio 4.0 or higher installed*
- Flutter SDK and dart plugins downloaded and installed on Android Studio*
- Setup an Android Emulator for testing purposes*
- Do a test drive to make sure all is running properly
For help on the above go to : https://flutter.dev/docs/get-started/install
learn python programming language that is used widely to program games. It will be a hands-on experience to program & go back in time to a very famous old arcade game called “Space Invaders” using python
This workshop will deliver basics on how to set up your own website and will help you understand the features of WordPress. In addition to that, you will have access to Divi Theme Builder for free for 5 consecutive days. Don't miss the chance, and join us to live the Journey.
WTM/IWD 202: Introduction to digital accessibility by Dr. Zainab AlMerajGDGKuwaitGoogleDevel
This talk will offer the following:
* a case for ensuring websites, apps and documents are accessible to all
* a glimpse into how people with disabilities use assistive technology
* an introduction on the international standards and principles of digital accessibility (WAI WCAG POUR principles of digital accessibility) used to assess if content will be accessible to all users.
Audience:
This talk is suitable for anyone new to the field
* Developers
* Testers
* Designers
* Content creators
* Product owners / managers in development environments
* Managers (at an organizational level)
* Trainers / Teachers / Academics
In this event we will walk you through best practices and the practical Implementation of the following topics:
Advantage of Kotlin over Java, Kotlin Coroutines .
What’s new in Android Studio, How to use Motion Layout Editor
NaviGation Architecture component, Vivewmodel, Livedata, Room database, Jetpack Compose,
Material Design Library...etc
App Distribution - Android App bundle over an APK
Most people think to build an app they must write native Android or iOS code. However, web frameworks allow developers to easily build powerful web apps. Tools like Ionic allow developers to make apps that feel native with their UI, offline capabilities, and the ability to install them onto a user's device. The web is advancing at an unprecedented rate; we can take advantage of this. Learn what makes a PWA progressive and how to build amazing (web) apps!
DevFest Kuwait 2020- Cloud Study Jam: Kubernetes on Google CloudGDGKuwaitGoogleDevel
Kubernetes is the most popular container orchestration system, and Google Kubernetes Engine was designed specifically to support managed Kubernetes deployments in Google Cloud. In this advanced-level quest, you will get hands-on practice configuring Docker images, containers, and deploying fully-fledged Kubernetes Engine applications. This quest will teach you the practical skills needed for integrating container orchestration into your own workflow.
Machine learning has become an important toolset in mobile development, enabling many smart capabilities in modern mobile apps. If you are a mobile developer who is new to machine learning and want a quick introduction about the machine learning techniques that you can integrate to your mobile app, this PowerPoint show is for you!
Programming Foundation Models with DSPy - Meetup SlidesZilliz
Prompting language models is hard, while programming language models is easy. In this talk, I will discuss the state-of-the-art framework DSPy for programming foundation models with its powerful optimizers and runtime constraint system.
Infrastructure Challenges in Scaling RAG with Custom AI modelsZilliz
Building Retrieval-Augmented Generation (RAG) systems with open-source and custom AI models is a complex task. This talk explores the challenges in productionizing RAG systems, including retrieval performance, response synthesis, and evaluation. We’ll discuss how to leverage open-source models like text embeddings, language models, and custom fine-tuned models to enhance RAG performance. Additionally, we’ll cover how BentoML can help orchestrate and scale these AI components efficiently, ensuring seamless deployment and management of RAG systems in the cloud.
Essentials of Automations: The Art of Triggers and Actions in FMESafe Software
In this second installment of our Essentials of Automations webinar series, we’ll explore the landscape of triggers and actions, guiding you through the nuances of authoring and adapting workspaces for seamless automations. Gain an understanding of the full spectrum of triggers and actions available in FME, empowering you to enhance your workspaces for efficient automation.
We’ll kick things off by showcasing the most commonly used event-based triggers, introducing you to various automation workflows like manual triggers, schedules, directory watchers, and more. Plus, see how these elements play out in real scenarios.
Whether you’re tweaking your current setup or building from the ground up, this session will arm you with the tools and insights needed to transform your FME usage into a powerhouse of productivity. Join us to discover effective strategies that simplify complex processes, enhancing your productivity and transforming your data management practices with FME. Let’s turn complexity into clarity and make your workspaces work wonders!
How to Get CNIC Information System with Paksim Ga.pptxdanishmna97
Pakdata Cf is a groundbreaking system designed to streamline and facilitate access to CNIC information. This innovative platform leverages advanced technology to provide users with efficient and secure access to their CNIC details.
Removing Uninteresting Bytes in Software FuzzingAftab Hussain
Imagine a world where software fuzzing, the process of mutating bytes in test seeds to uncover hidden and erroneous program behaviors, becomes faster and more effective. A lot depends on the initial seeds, which can significantly dictate the trajectory of a fuzzing campaign, particularly in terms of how long it takes to uncover interesting behaviour in your code. We introduce DIAR, a technique designed to speedup fuzzing campaigns by pinpointing and eliminating those uninteresting bytes in the seeds. Picture this: instead of wasting valuable resources on meaningless mutations in large, bloated seeds, DIAR removes the unnecessary bytes, streamlining the entire process.
In this work, we equipped AFL, a popular fuzzer, with DIAR and examined two critical Linux libraries -- Libxml's xmllint, a tool for parsing xml documents, and Binutil's readelf, an essential debugging and security analysis command-line tool used to display detailed information about ELF (Executable and Linkable Format). Our preliminary results show that AFL+DIAR does not only discover new paths more quickly but also achieves higher coverage overall. This work thus showcases how starting with lean and optimized seeds can lead to faster, more comprehensive fuzzing campaigns -- and DIAR helps you find such seeds.
- These are slides of the talk given at IEEE International Conference on Software Testing Verification and Validation Workshop, ICSTW 2022.
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...SOFTTECHHUB
The choice of an operating system plays a pivotal role in shaping our computing experience. For decades, Microsoft's Windows has dominated the market, offering a familiar and widely adopted platform for personal and professional use. However, as technological advancements continue to push the boundaries of innovation, alternative operating systems have emerged, challenging the status quo and offering users a fresh perspective on computing.
One such alternative that has garnered significant attention and acclaim is Nitrux Linux 3.5.0, a sleek, powerful, and user-friendly Linux distribution that promises to redefine the way we interact with our devices. With its focus on performance, security, and customization, Nitrux Linux presents a compelling case for those seeking to break free from the constraints of proprietary software and embrace the freedom and flexibility of open-source computing.
UiPath Test Automation using UiPath Test Suite series, part 6DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 6. In this session, we will cover Test Automation with generative AI and Open AI.
UiPath Test Automation with generative AI and Open AI webinar offers an in-depth exploration of leveraging cutting-edge technologies for test automation within the UiPath platform. Attendees will delve into the integration of generative AI, a test automation solution, with Open AI advanced natural language processing capabilities.
Throughout the session, participants will discover how this synergy empowers testers to automate repetitive tasks, enhance testing accuracy, and expedite the software testing life cycle. Topics covered include the seamless integration process, practical use cases, and the benefits of harnessing AI-driven automation for UiPath testing initiatives. By attending this webinar, testers, and automation professionals can gain valuable insights into harnessing the power of AI to optimize their test automation workflows within the UiPath ecosystem, ultimately driving efficiency and quality in software development processes.
What will you get from this session?
1. Insights into integrating generative AI.
2. Understanding how this integration enhances test automation within the UiPath platform
3. Practical demonstrations
4. Exploration of real-world use cases illustrating the benefits of AI-driven test automation for UiPath
Topics covered:
What is generative AI
Test Automation with generative AI and Open AI.
UiPath integration with generative AI
Speaker:
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
Pushing the limits of ePRTC: 100ns holdover for 100 daysAdtran
At WSTS 2024, Alon Stern explored the topic of parametric holdover and explained how recent research findings can be implemented in real-world PNT networks to achieve 100 nanoseconds of accuracy for up to 100 days.
Communications Mining Series - Zero to Hero - Session 1DianaGray10
This session provides introduction to UiPath Communication Mining, importance and platform overview. You will acquire a good understand of the phases in Communication Mining as we go over the platform with you. Topics covered:
• Communication Mining Overview
• Why is it important?
• How can it help today’s business and the benefits
• Phases in Communication Mining
• Demo on Platform overview
• Q/A
For the full video of this presentation, please visit: https://www.edge-ai-vision.com/2024/06/building-and-scaling-ai-applications-with-the-nx-ai-manager-a-presentation-from-network-optix/
Robin van Emden, Senior Director of Data Science at Network Optix, presents the “Building and Scaling AI Applications with the Nx AI Manager,” tutorial at the May 2024 Embedded Vision Summit.
In this presentation, van Emden covers the basics of scaling edge AI solutions using the Nx tool kit. He emphasizes the process of developing AI models and deploying them globally. He also showcases the conversion of AI models and the creation of effective edge AI pipelines, with a focus on pre-processing, model conversion, selecting the appropriate inference engine for the target hardware and post-processing.
van Emden shows how Nx can simplify the developer’s life and facilitate a rapid transition from concept to production-ready applications.He provides valuable insights into developing scalable and efficient edge AI solutions, with a strong focus on practical implementation.
GraphRAG for Life Science to increase LLM accuracyTomaz Bratanic
GraphRAG for life science domain, where you retriever information from biomedical knowledge graphs using LLMs to increase the accuracy and performance of generated answers
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...Neo4j
Leonard Jayamohan, Partner & Generative AI Lead, Deloitte
This keynote will reveal how Deloitte leverages Neo4j’s graph power for groundbreaking digital twin solutions, achieving a staggering 100x performance boost. Discover the essential role knowledge graphs play in successful generative AI implementations. Plus, get an exclusive look at an innovative Neo4j + Generative AI solution Deloitte is developing in-house.
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc
How does your privacy program stack up against your peers? What challenges are privacy teams tackling and prioritizing in 2024?
In the fifth annual Global Privacy Benchmarks Survey, we asked over 1,800 global privacy professionals and business executives to share their perspectives on the current state of privacy inside and outside of their organizations. This year’s report focused on emerging areas of importance for privacy and compliance professionals, including considerations and implications of Artificial Intelligence (AI) technologies, building brand trust, and different approaches for achieving higher privacy competence scores.
See how organizational priorities and strategic approaches to data security and privacy are evolving around the globe.
This webinar will review:
- The top 10 privacy insights from the fifth annual Global Privacy Benchmarks Survey
- The top challenges for privacy leaders, practitioners, and organizations in 2024
- Key themes to consider in developing and maintaining your privacy program
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slackshyamraj55
Discover the seamless integration of RPA (Robotic Process Automation), COMPOSER, and APM with AWS IDP enhanced with Slack notifications. Explore how these technologies converge to streamline workflows, optimize performance, and ensure secure access, all while leveraging the power of AWS IDP and real-time communication via Slack notifications.
4. 3
For Mac OS
Environment
1. From Downloads file choose python-3.9.2 file
2. Click continue
3. Click agree.
4. Insert your password then click install.
6. 5
Downloading PyCharm
code editor
The Python IDE Integrated development environment
Website:
https://www.jetbrains.com/pycharm/do
wnload/#section=mac
8. 7
Mac users
3. Go to downloads and click on
PyCharm folder.
4. Drag PyCharm icon to
Applications folder.
5. This window will appear because it is
downloaded from the internet.
9. 8
Windows users
3. Click on the downloaded PyCharm folder then click “next”.
4. Click “next”.
5. Check the 64-bit launcher then press ”next”.
6. Click ”install”
11. 10
• Choose the first choice then click next , next, next and next again.
• Finally, this is the main page of PyCharm. Click on create new
project.
12. 11
What are we going to learn in part 1?
• Basic programming terminologies.
• Writing comments.
• Variables, String Numbers.
• Data types: Integer, Float, String, Boolean.
• print function.
• Input function.
• Python conditional statements (If/elif/else statements) & Operators.
• Loops (for, Nested loop, while).
13. 12
Basic Programming terms
• What is programming?
• Programming is using a code or source code, which is a sequence of
instructions to develop a program that will provide an output solution using
several tools such as a programming language & programming language
editor.
• output: The messages printed to the user by a program.
• console: The text box onto which output is printed.
14. 13
Basic Programming terms (cont.)
• What is programming language?
• Programming language is a tool used to create a program by writing human
like language in a specific structure (syntax) using an editor that will translate
the human language to binary language of zeros and ones, which is the
computer language.
• syntax: The set of legal structures and commands that can be used in a particular
programming language.
• Types of programming languages:
• Open Source programming language:
• Python
• Paid Source
15. 14
What is ?
• Python is an open source and cross-platform programming language
that has a general purpose used widely by developer's community to
create websites, games, machine learning modules and more.
• Why should you learn Python?
● Big Community
● General-purpose
● Open-source and cross-platform
● High productivity
● Memory safe
16. 15
What is Python?
• High-level programming language.
• Invented in the Netherlands, early 90s by Guido van Rossum
• Named after Monty Python
• Open sourced from the beginning
• Increasingly popular
17. 16
Why Python?
• Simple
• Python is a simple and minimalistic language in nature
• Reading a good python program should be like reading English
• Easy to Learn
• Cool documentation
• Free & Open source
• Freely distributed and Open source
• Maintained by the Python community
• High Level Language
• Portable
• The same code can run on Windows, Linux, MAC machines
19. 18
Comments (Best Practice)
• Comments: notes of explanation within a program
• Ignored by Python interpreter
• Intended for a person reading the program’s code
• Begin with a # character
• Types of comments:
• Single Line Comments [ using # ]
• Multi-Line Comments """ type whatever here... """
• Example:
• Output:
# This line is a comment.
print("This line is not a comment, it is
code.")
This line is not a comment, it is code.
20. 19
Variables
• Rules for naming variables in Python:
• Variable name cannot be a Python keyword
• Variable name cannot contain spaces
• First character must be a letter or an underscore
• After first character may use letters, digits, or underscores
• Variable names are case sensitive
• Variable name should reflect its use
• Variable: name that represents a
value stored in the computer
memory
• Used to access and manipulate
data stored in memory
• A variable references the value it
represents
• Assignment statement: used to
create a variable and make it
reference data
• Defining a variable:
• variable = expression
• Example:
age = 29
student_name= ’Maryam’
21. 20
Variable Name Rules
1. Names cannot start with a number.
ex: 2made x
2. Names cannot contain spaces, use _ instead.
ex: two days x, and make it “two_days”
3. Names cannot start with symbols :’
",<>/?|()!@#$%^&*~-+ 4.
It's best practice to use names with lowercase.
22. 21
Types of expressions that can be assigned
to a variable
Float
x = 3.56
String (str)
L = “Hello”
Integer (int)
Score_2 = 234
Boolean
Pass_test = True OR False
23. 22
print function
• Print function is used to give us the output of a variable stored value , or
print an input from the end-user or the developer of the program.
• For example:
• Variable stored value as output syntax:
x=3
y=5
result= x+y
print(result)
• Input from the developer syntax:
print(“Hello World”)
• Input from the end-user syntax:
name= input(‘What is your name? ‘)
print(‘Hi ‘+name)
24. 23
print
• Print function used to display and print a line of output on the console
• Example:
print("Hello, world!")
print()
print("This program produces")
print("four lines of output")
• Its output:
Hello, world!
This program produces
four lines of output
25. 24
Strings
• Strings (str)
• Must be enclosed in single (‘) or double (“) quote marks
• For example:
my_string = "This is a double-quoted string."
my_string = 'This is a single-quoted string.’
my_string= ‘ This is a “single-quoted” string.’
my_string= “ This is a ‘double-quoted’ string.”
double quotes to wrap single quotes
single quotes to wrap double quotes
26. 25
Strings
• Example:
• Output:
message = "Hello Python World! "
print(message)
message = "Python is my favorite language! "
print(message)
Hello Python World!
Python is my favorite language!
27. 26
String Concatenation
• String Concatenation: The + operator is used to concatenate strings
s = ‘Love’ + ‘Coding’
print(s) // LoveCoding
letter = ‘z-’
print(letter * 10) // z-z-z-z-z-z-z-z-z-z-
28. 27
Built In string methods
1. Upper: Returns a copy of the string converted to uppercase
2. Lower: Returns a copy of the string converted to lowercase
3. Capitalize: Returns a copy of the string with only it’s first letter
capitalized
4. Split: It splits a string, and also allows you to split on any element of
the string
29. 28
Strings
• String Functions
• len(string) - number of characters in a string
• str.lower(string) - lowercase version of a string
• str.upper(string) - uppercase version of a string
• str.isalpha(string) - True if the string has only alpha chars
• Many others: split, replace, find, format, etc.
• Note the “dot” notation: These are static methods.
30. 29
Strings
• Example:
• Output:
s1= "Welcome to 500 course"
print(len(s1))
print(str.lower(s1))
print(str.upper(s1))
print(str.isalpha(s1))
21
welcome to 500 course
WELCOME TO 500 COURSE
False
31. 30
Strings
• escape sequence: A sequence of characters used to represent certain
special characters in a string.
t tab character
n new line character
" quotation mark character
backslash character
33. 32
Numbers
• Numbers in Python can be in a form of:
• Integer (int) , for example:
age = 37
• Float, for example:
gpa = 3.67
• You can do all of the basic operations
with numbers.
• + for addition
• - for subtraction
• * for multiplication
• / for division
• ** for exponent
• () for parenthesis
print(3+4)
print(1.6-9.5)
print(2**2)
print(5.5/2)
result= 2+ 3*4
print(result)
result= (2+ 3)*4
print(result)
7
-7.9
4
2.75
14
20
34. 33
Numbers
• A simple way to view the effect of an assignment is to assume that when
a variable changes, its old value is replaced
• You can change the value of a variable at any point.
x = 2
print(x)
x = 2.3
print(x)
2
Before
2.3
After
x x
35. 34
Variables, Strings, and Numbers
• Dealing with simple numerical data is fairly straightforward in Python.
• There are different types of numbers: Integer and Float are most used.
• Integer like 3 , Float like 4.8
• You can do all of the basic operations with numbers.
• + for addition
• - for subtraction
• * for multiplication
• / for division
• ** for exponent
• () for parenthesis
• Higher precedence performed first
• Same precedence operators execute from left to right
37. 36
Assigning input
• So far, we have been using values specified by programmers and printed
or assigned to variables
• How can we let users (not programmers) input values?
• In Python, input is accomplished via an assignment statement combined
with a built-in function called input
• When Python encounters a call to input, it prints <prompt> (which is a
string literal) then pauses and waits for the user to type some text and
press the <Enter> key
38. 37
Assigning input
• Here is a sample interaction with the Python interpreter:
• Example:
• Output:
• Notice that whatever the user types is then stored as a string
• What happens if the user inputs a number?
name= input("Enter your name ")
Enter your name Fatma
39. 38
Assigning input
• In Python, the + operator can only concatenate strings as Python is
a strongly typed programming language.
• Example:
• Output:
Enter your favorite course name python
your favorite course name is python
name= input("Enter your favorite course name ")
print("your favorite course name is "+ name)
40. 39
Assigning input
• we can convert the string output of the input function into an integer or
a float using the built-in int and float functions
• Example:
• Output
number= int(input("Enter a number "))
Enter a number 3 An integer
41. 40
Assigning input
• We can convert the string output of the input function into an integer or
a float using the built-in int and float functions
• Example:
• Output
number= float(input("Enter a number "))
Enter a number 3.7 A float
42. 41
Assigning input
• We can do various kinds of conversions between strings, integers and
floats using the built-in int, float, and str functions
integer float
integer string
string float
string integer
float integer
float string
x= 10
print(x)
print(float(x))
print(str(x))
y='20'
print(y)
print(float(y))
print(int (y))
z= 30.0
print(z)
print (int(z))
print (str(z))
30.0
30
30.0
20
20.0
20
10
10.0
10
43. 42
If statement
Making Decisions – Controlling Program Flow
• To make interesting programs, you must be able to make decisions about data
and take different actions based upon those decisions.
• if statement: Executes a group of statements only if a certain condition is
true. Otherwise, the statements are skipped.
• Syntax of the If statement:
if condition:
Statement
Statement
• First line known as the if clause
• Includes the keyword “if” followed by “condition”
• The condition can be true or false
• When the if statement executes, the condition is tested, and if it is true the block statements are
executed. otherwise, block statements are skipped.
44. 43
If statement
• Example:
• Output:
• The indented block of code following an if statement is executed if
the Boolean expression is true, otherwise it is skipped.
gpa = 3.4
if gpa > 2.0:
print ("Your application is accepted.”)
Your application is accepted.
45. 44
if/else statements
• if/else statement: Executes one block of statements if a certain
condition is True, and a second block of statements if it is False.
• Example:
gpa = 1.4
if gpa > 2.0:
print("Welcome to University!")
else:
print("Your application is denied.")
print(“Good luck”)
46. 45
If/ELIF/ELSE
• If you have several mutually exclusive choices, and want to guarantee that only
one of them is executed, you can use an IF/ELIF/ELSE statements. The ELIF
statement adds another boolean expression test and another block of code that
is executed if the boolean expression is true.
• Syntax:
if boolean expression :
STATEMENT
STATEMENT
elif 2nd boolean expression :
STATEMENT
STATEMENT
else:
STATEMENT
STATEMENT
47. 46
If/ELIF/ELSE- Example
numberOfWheels = 3
if ( numberOfWheels == 1):
print “You are a Unicycle!”
elif (numberOfWheels == 2):
print “You are a Motorcycle!”
elif (numberOfWheels == 3):
print “You are a Tricycle!”
elif (numberOfWheels == 4):
print “You are a Car!”
else:
print “That's a LOT of wheels!”
• Only the print statement from the first true boolean expression is
executed.
48. 47
Loops
• A loop statement allows us to execute a
statement or group of statements
multiple times.
• Two types of loops:
• for loop:
Executes a sequence of statements multiple
times and abbreviates the code that manages
the loop variable.
• while loop:
Repeats a statement or group of statements
while a given condition is TRUE. It tests the
condition before executing the loop body.
49. 48
for Loop
• for loop: Repeats a set of statements over a group of values.
• Syntax:
• Example:
for < var > in range<sequence or group of valuse>:
<statements>
for i in range(5):
... print(i)
0
1
2
3
4
• Rules of loops:
• We indent the statements to be
repeated with tabs or spaces.
• VariableName gives a name to each
value, so you can refer to it in the
statements.
• GroupOfValues can be a range of
integers, specified with the range
function.
50. 49
for
• Example:
• Output:
• Example:
• Output:
for x in (1 , 5):
print(x," Hello")
1 Hello
5 Hello
for x in range(1 , 5):
print(x," Hello")
1 Hello
2 Hello
3 Hello
4 Hello
51. 50
for
• Example:
• Output:
n = 100
sum = 0
for counter in range(1,n+1):
sum = sum + counter
print("Sum of 1 until 100:”, sum)
Sum of 1 until 100: 5050
52. 51
Nested Loop
• Loops defined within another loop is called Nested loop. When an outer loop contains an inner loop
in its body it is called Nested looping.
• Syntax:
for <expression>:
for <expression>:
body
• for example:
Stops summing at 4
because it is grater than
5 and does not count 5
as an output
2+1 =3
3+1=4
4+1=5 it will give
output 4 and
ends the output
result as 4
for a in range (1,5):
for b in range (1,a+1):
print(a)
53. 52
while
• while loop: Executes a group of statements as long as a condition is
True.
• good for indefinite loops (repeat an unknown number of times)
• Syntax:
while condition:
statements
• Example: Output:
number = 1
while number < 200:
print (number)
number = number * 2
1
2
4
8
16
32
64
128
55. 54
Review
1. Which of the following are legal python identifiers (circle your answers).
a) hello
b) 5times
c) int
d) Pepper2
e) iden_tifier
f) APPLES
g) if
h) _1xyz
56. 55
Review
1. Which of the following are legal python identifiers (circle your answers).
a) hello
b) 5times
c) int
d) Pepper2
e) iden_tifier
f) APPLES
g) if
h) _1xyz
57. 56
Review
2. Which of the following mark the beginning of a comment?
a) //
b) /*
c) /**
d) #
3. Select all option(s) that print Python-is-very-easy
a) print(“Python‟, “is‟, “very‟, “easy”)
b) b) print(“Python‟, “is‟, “very‟, “easy‟ + “-‟ * 4 c)
c) print(“Python-‟ + “is - very - easy‟)
d) d) print(“Python‟ + “-‟ + “is‟ + “-‟ + “very‟ + “-‟ + “easy‟)
58. 57
Review
2. Which of the following mark the beginning of a comment?
a) //
b) /*
c) /**
d) #
3. Select all option(s) that print Python-is-very-easy
a) print(“Python‟, “is‟, “very‟, “easy”)
b) print(“Python‟, “is‟, “very‟, “easy‟ + “-‟ * 4 c)
c) print(“Python-‟ + “is - very - easy‟)
d) print(“Python‟ + “-‟ + “is‟ + “-‟ + “very‟ + “-‟ + “easy‟)
59. 58
Review
4. What gets printed when Python execute that program
x ='5’
y = 2
z = x+y
Print(z)
a) 52
b) 7
c) Syntax Error
d) z
60. 59
Review
4. What gets printed when Python execute that program
x ='5’
y = 2
z = x+y
Print(z)
a) 52
b) 7
c) Syntax Error
d) z
61. 60
Review
7. Write a Python program that can take four float numbers from the
console/ user and displays their average.
62. 61
Review
7. Write a Python program that reads four float numbers from the
console and displays their average.
x= float(input (" Enter first number"))
y= float(input (" Enter second number"))
z= float(input (" Enter third number"))
w= float(input (" Enter fourth number"))
av= (x+y+z+w)/4
print("The aveage is ", av)
63. 62
Exercise
Write a Python program that reads two numbers and determines the following:
If two numbers are equal, then it will print first number = second number
If the first number is greater than the second number, it will print first number > second number
If the first number is less than the second number, it will print first number < second number
Sample output 1:
Enter the first number:
3
Enter the second number:
5
3 < 5
Sample output 2:
Enter the first number:
7
Enter the second number:
7
7 = 7
64. 63
Exercise Solution
x=int(input("Enter the first number: "))
y=int(input("Enter the second number: "))
if (x==y):
print (x," = ", y)
elif (x<y):
print(x," < ", y)
else:
print(x," > ", y)
67. What are we going to learn?
• Functions
• Global and local variables
• Python Lists, Tuples, Sets, Dictionaries
• Python Arrays
• Python Try… Except
• Object-oriented programming
• Python Classes/Objects
• Modules and modules’ methods
66
68. Functions
• A function is a block of code which only runs when it is called.
• You can pass data, known as parameters, into a function.
• A function can return data as a result.
Creating a function syntax:
Calling a function:
• To call a function, use the function name followed by parenthesis:
67
69. Functions
Function Arguments:
• Information can be passed into functions as arguments.
• Arguments are specified after the function name, inside the
parentheses. You can add as many arguments as you want, just
separate them with a comma.
Example:
def my_function(fname):
print(fname + " Johnson")
my_function("Emil")
my_function("Tobias")
my_function("Linus") 68
71. Functions
Example:
def bar(x) :
return x * x
print(bar(3))
Output:
9
• Note that the function bar takes
one parameter and returns the
square of the x value inputted.
70
72. Global and local variables
• A global variable is a variable declared outside of a function
• Scope: this variable can be used in the entire program
• A local variable is a variable declared inside of a function.
• Scope: this variable is used only in the function it is declared in.
71
73. Global and local variables
• Will this code work?
Yes it will work!!
72
74. Global and local variables
• We can use the global key word if we want to change a global variable
inside a function.
• Will this code work?
Yes it will work!!
73
75. Lists:
• Lists are used to store multiple items in a single variable.
• Lists are one of 4 built-in data types in Python used to store
collections of data, the other 3 are Tuple, Set, and Dictionary, all with
different qualities and usage.
• Lists are created using square brackets and each item is separated by
a comma.
• Examples of Lists:
my_list = [1,2,3]
my_list = [‘strings’, 1, 2, 3.9, True, [1,2,3] ]
print(len(my_list))
List can contain
numbers, strings,
nested lists, etc.
The len() function will tell you how many
items are in the sequence of your list
Python Lists, Tuples, Sets, Dictionaries
74
76. • A list or array is a sequence of items where the entire sequence is
referred to by a single name (i.e. s) and individual items can be selected
by indexing (i.e. s[i]). The first item in the list has an index of 0.
• Python lists are dynamic. They can grow and shrink on demand.
• In other programming languages, arrays are generally a fixed size,
meaning that when you create the array, you have to specify how many
items it can hold.
• Python lists are heterogeneous, a single list can hold arbitrary data
types.
• Arrays are generally homogeneous, meaning they can hold only one data
type.
Python Lists, Tuples, Sets, Dictionaries
75
77. List Positive and Negative Indices:
t = [23, ‘abc’, 4.56, 3, ‘def’]
Positive index: count from the left, starting with 0
print(t[1])
‘abc’
Negative index: count from right, starting with –1
Print(t[-3])
4.56
Python Lists, Tuples, Sets, Dictionaries
76
81. List Operations (Slicing)
Examples:
t = [23, ‘abc’, 4.56, 3, ‘def’]
Returns copy of list with subset of original members. Start copying at first
index, and stop copying before the second index
print t[1:4]
[‘abc’, 4.56, 3]
You can also use negative indices
print t[1:-1]
[‘abc’, 4.56, 3]
Python Lists, Tuples, Sets, Dictionaries
80
82. List Operations (Slicing)
Examples:
t = [23, ‘abc’, 4.56, 3, ‘def’]
Omit first index to make a copy starting from the beginning of list
print(t[:2])
[23, ‘abc’]
Omit second index to make a copy starting at 1st index and going to end of the
list
print(t[2:])
[4.56, 3, ‘def’]
Python Lists, Tuples, Sets, Dictionaries
81
83. List Operations (Copying the whole list)
• [ : ] makes a copy of an entire sequence
print(t[:])
[23, ‘abc’, 4.56, 3, ‘def’]
Python Lists, Tuples, Sets, Dictionaries
82
84. List Operations ( “in” Operator)
• Boolean test whether a value is inside a list:
t = [1, 2, 4, 5]
print(3 in t)
False
print(4 in t)
True
• For strings, tests for substrings
a = 'abcde’
print('c' in a)
True
'cd' in a
True
Print('ac' in a)
False
• Careful: the in keyword is also used in the syntax of for loops and list
comprehensions
Python Lists, Tuples, Sets, Dictionaries
83
88. List Functions:
• len(ex_list): number of elements in list (top level).
• min(ex_list): smallest element. Must all be the same type!
• max(ex_list): largest element, again all must be the same type
• sum(ex_list): sum of the elements, numeric only
Python Lists, Tuples, Sets, Dictionaries
87
89. • List Functions Examples:
• Output:
C = ['A', 'B', 'C', 'D']
print (C.index('C'))
2
C = ['C', 'B', 'A', 'D’]
print (len(C))
4
C = ['A', 'B', 'C', 'D’]
print (C.count(‘A’))
D = ['A', 'B', ‘A', ‘D’]
print (D.count(‘A’))
1
2
Python Lists, Tuples, Sets, Dictionaries
88
93. Tuples:
• A tuple is a collection which is ordered and unchangeable.
• Tuples are written with round brackets.
• Tuple items are indexed: the first item has index [0], the second item
has index [1] etc.
Example:
Python Lists, Tuples, Sets, Dictionaries
92
94. Sets:
• A set is a collection which is both unordered and unindexed.
• Unordered: Set items can appear in a different order every time you
use them, and cannot be referred to by index or key.
• Set items are unordered, unchangeable, and do not allow duplicate
values.
• Sets are written with curly brackets.
Python Lists, Tuples, Sets, Dictionaries
93
96. Dictionaries:
• Dictionaries are used to store data values in key:value pairs.
• A dictionary is a collection which is ordered (Python 3.7+), changeable
and does not allow duplicates.
• Dictionaries are written with curly brackets, and have keys and values:
Python Lists, Tuples, Sets, Dictionaries
95
97. • Python offers built-in data types for storing collection of data such as
Lists, Tuples, Sets etc.
• However, there is a module called array that allows us to use arrays to
store a collection of numeric values of same numeric data type.
• Lists are much more flexible than arrays. They can store elements of
different data types including strings. And, if you need to do
mathematical computation on arrays and matrices, you are much
better off using something like NumPy.
Python Arrays
96
98. • When an error occurs, or exception as we call it, Python will normally
stop and generate an error message.
• These exceptions can be handled using the try statement.
• The try block lets you test a block of code for errors.
• The except block lets you handle the error.
• Example (variable x is never defined):
Python Try… Except
97
99. • We can define as many exception blocks as we want.
• Example: if you want to execute a special block of code for a special
kind of error:
Python Try… Except
98
101. • Real use scenario:
try:
f = open("demofile.txt")
f.write("New user: Alex")
f.close()
except:
print("Something went wrong when writing to the file")
Python Try… Except
100
102. Object-Oriented Programming
• Object-oriented programming (OOP) is a method of structuring a program
by bundling related properties and behaviors into individual objects.
• For instance, an object could represent a person with properties like a
name, age, and address and behaviors such as walking, talking, breathing,
and running. Or it could represent an email with properties like a recipient
list, subject, and body and behaviors like adding attachments and sending.
• Put another way, object-oriented programming is an approach for
modeling concrete, real-world things, like cars, as well as relations between
things, like companies and employees, students and teachers, and so on.
OOP models real-world entities as software objects that have some data
associated with them and can perform certain functions. 101
103. Python Classes & Objects
• Python is an object-oriented programming language.
• Almost everything in Python is an object, with its properties and
methods.
• A Class is like an object constructor, or a "blueprint" for creating
objects
102
104. Python Classes & Objects
• To understand the meaning of classes we have to understand the
built-in __init__() function.
• All classes have a function called __init__(), which is always executed
when the class is being initiated.
• Use the __init__() function to assign values to object properties, or
other operations that are necessary to do when the object is being
created.
103
105. Python Classes & Objects
Example: Create a class named Person, use the __init__() function to
assign values for name and age:
104
106. Python Classes & Objects
• Objects can also contain methods. Methods in objects are functions
that belong to the object.
Example: Insert a function that prints a greeting, and execute it on the
p1 object.
105
107. Python Classes & Objects
• The self parameter is a reference to the current instance of the class,
and is used to access variables that belongs to the class.
• You can modify properties of objects like this:
• You can delete properties of an object, or the object itself entirely by
using the del keyword:
106
108. Python Classes & Objects
Exercise:
Create a class named "Car" with the following 3 attributes: brand, color, price. The class
should have a function for printing out the object's details. Create a new object and call
the function to print the values assigned.
Hint: Remember the format for creating a class:
class Car:
def __init__(self, brand, color, price):
self.brand = brand
…
…
Finished early? Add a line of code for modifying the color of the car object being added to
YELLOW.
107
109. Python Classes & Objects
Exercise Solution:
Modification for color
108
111. Modules & Modules’ methods
What is a module?
• Consider a module to be the same as a code library.
• A file containing a set of functions you want to include in your application.
• The highest-level structure of Python
• Each file with the .py suffix is a module
• Each module has its own namespace
• Example of syntax:
• import mymodule Brings all elements of mymodule in, but must refer to as
mymodule.
• Examples of common Modules:
Math Module Turtle Module Pandas Module
Random Module Matplotlib Module 110
112. Modules & Modules’ methods
Example for creating and using a module:
• To create a module just save the code you want in a file with the file
extension .py:
• We can now use the module we just created by using the import
statement:
111
113. Thank you!
GDG Kuwait would like to thank you for attending today’s
workshop and wishes you all the best in your learning
journey!
112