Sunteți pe pagina 1din 65

Government College University, Faisalabad

AI Lab Manual

By

UZMA JAMIL

Department of Computer Science


Lab # Title Impact Page#

Lab #1 INTRODUCTION OF PYTHON LANGUAGE CLO-01 3


& FAMILIAR WITH JETBRAINS PYCHARM
Lab #2 Basic Input / Output in python , Comments, Escape CLO-01, 9
Sequence, Variables CLO-03

Lab #3 Type Casting, Operators, String Slicing


Lab #4 Lists and Its Functions , Tuple
Lab #5 Dictionary and Its Functions , Sets
Lab #6 IF and Elif and Else Conditions
Lab #7

Lab #8

Lab #9

Lab #10

Lab #11

Lab #12

Lab #13

Lab #14

Lab #15

Lab #16 PRACTICAL EXAMINATION


Lab Activity 1

INTRODUCTION OF PYTHON LANGUAGE


&
FAMILIAR WITH JETBRAINS PYCHARM

What is Python?
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-orientated way or a
functional way.

Good to know
 The most recent major version of Python is Python 3, which we shall be
using in this tutorial. However, Python 2, although not being updated with
anything other than security updates, is still quite popular.
 In this tutorial Python will be written in a text editor. It is possible to write
Python in an Integrated Development Environment, such as Thonny,
Pycharm, Netbeans or Eclipse which are particularly useful when
managing larger collections of Python files.

Python Syntax compared to other programming


languages
 Python was designed for readability, and has some similarities to the
English language with influence from mathematics.
 Python uses new lines to complete a command, as opposed to other
programming languages which often use semicolons or parentheses.
 Python relies on indentation, using whitespace, to define scope; such as
the scope of loops, functions and classes. Other programming languages
often use curly-brackets for this purpose.
Python Getting Started

Python Install
Many PCs and Macs will have python already installed.

To check if you have python installed on a Windows PC, search in the start bar
for Python or run the following on the Command Line (cmd.exe):

C:\Users\Your Name>python --version

To check if you have python installed on a Linux or Mac, then on linux open the
command line or on Mac open the Terminal and type:

python --version

If you find that you do not have python installed on your computer, then you
can download it for free from the following website: https://www.python.org/

Python Quickstart (Command promte)


Python is an interpreted programming language, this means that as a developer
you write Python (.py) files in a text editor and then put those files into the
python interpreter to be executed.

The way to run a python file is like this on the command line:

C:\Users\Your Name>python helloworld.py

Where "helloworld.py" is the name of your python file.

Let's write our first Python file, called helloworld.py, which can be done in any
text editor.

helloworld.py

print("Hello, World!")
Simple as that. Save your file. Open your command line, navigate to the
directory where you saved your file, and run:

C:\Users\Your Name>python helloworld.py

The output should read:

Hello, World!

Congratulations, you have written and executed your first Python program.

The Python Command Line


To test a short amount of code in python sometimes it is quickest and easiest
not to write the code in a file. This is made possible because Python can be run
as a command line itself.

Type the following on the Windows, Mac or Linux command line:

C:\Users\Your Name>python
Or, if the "python" command did not work, you can try "py":
C:\Users\Your Name>py

From there you can write any python, including our hello world example from
earlier in the tutorial:

C:\Users\Your Name>python
Python 3.6.4 (v3.6.4:d48eceb, Dec 19 2017, 06:04:45) [MSC v.1900 32 bit
(Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> print("Hello, World!")

Which will write "Hello, World!" in the command line:

C:\Users\Your Name>python
Python 3.6.4 (v3.6.4:d48eceb, Dec 19 2017, 06:04:45) [MSC v.1900 32 bit
(Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> print("Hello, World!")
Hello, World!

Whenever you are done in the python command line, you can simply type the
following to quit the python command line interface:

exit()
PyCharm- Introduction

PyCharm is the most popular IDE used for Python scripting language. This chapter will give you an
introduction to PyCharm and explains its features.

PyCharm offers some of the best features to its users and developers in the following aspects:

 Code completion and inspection


 Advanced debugging
 Support for web programming and frameworks such as Django and Flask

User Interface of PyCharm Editor

The user interface of PyCharm editor is shown in the screenshot given below. Observe that the editor
includes various features to create a new project or import from an existing project.
From the screenshot shown above, you can see the newly created project Demo and the site-packages
folder for package management along with various other folders.

You can download the PyCharm Editor and read its official documentation at this link:
https://www.jetbrains.com/pycharm/
PyCharm – Installation
In this chapter, you will learn in detail about the installation process of PyCharm on your local computer.

Steps Involved
You will have to follow the steps given below to install PyCharm on your system. These steps show the
installation procedure starting from downloading the PyCharm package from its official website to
creating a new project.

Step 1

Download the required package or executable from the official website of PyCharm
https://www.jetbrains.com/pycharm/download/#section=windows. Here you will observe two versions of
package for Windows as shown in the screenshot given below:

Note that the professional package involves all the advanced features and comes with free trial for few
days and the user has to buy a licensed key for activation beyond the trial period. Community package is
for free and can be downloaded and installed as and when required. It includes all the basic features
needed for installation. Note that we will continue with community package throughout this tutorial.
Step 2

Download the community package (executable file) onto your system and mention a destination folder as
shown below:
Step 3

Now, begin the installation procedure similar to any other software package.
Step 4

Once the installation is successful, PyCharm asks you to import settings of the existing package if any.
This helps in creating a new project of Python where you can work from the scratch. Note that unlike
other IDEs, PyCharm only focusses on working with projects of Python scripting language.
PyCharm – Understanding Basics
This chapter will discuss the basics of PyCharm and make you feel comfortable to begin working in
PyCharm editor.
When you launch PyCharm for the first time, you can see a welcome screen with entry points to IDE such
as:
 Creating or opening the project
 Checking out the project from version control
 Viewing the documentation
 Configuring the IDE

Recall that in the last chapter, we created a project named demo1 and we will be referring to the same
project throughout this tutorial. Now we will start creating new files in the same project to understand the
basics of PyCharm Editor
The above snapshot describes the project overview of demo1 and the options to create a new file. Let us
create a new file called main.py.

The code included in main.py is as follows:


The code created in the file main.py using PyCharm Editor is displayed as shown below:

This code can be run within IDE environment. The basic demonstration of running a program is discussed
below:
Note that we have included some errors within the specified code such that console can execute the code
and display output as the way it is intended to.
FOR MORE:
https://www.tutorialspoint.com/pycharm/pycharm_tutorial.pdf
Lab Activity 2

PROGRAMMING WITH PYTHON LANGUAGE

Basic Input / Output in PYTHON


Output using print() function. The simplest way to produce output is using the
print() function where you can pass zero or more expressions separated by commas.
This function converts the expressions you pass into a string before writing to the
screen.

Syntax:
Print(“Hello world!”)

The input() method reads a line from input, converts into a string and returns it. The
syntax of input() method is:

Syntax:
input([prompt])

Comments:

Comments can be used to explain Python code.

Comments can be used to make the code more readable.

Comments can be used to prevent execution when testing code.

Creating a Comment:
Comments starts with a #, and Python will ignore them:

Syntax:
#This is a comment
print("Hello, World!")

Output:
Hello, World!

Comments can be placed at the end of a line, and Python will ignore the rest of
the line:

Syntax:
print("Hello, World!") #This is a comment

Output:
Hello, World!

Comments does not have to be text to explain the code, it can also be used to
prevent Python from executing code:

Syntax:
#print("Hello, World!")
print("Cheers, Mate!")
Output:
Cheers, Mate!

Escape Sequence:
These are non-printing characters. They are special character set, each with specific
meaning. An escape sequence always begins with a back slash and is followed by one or
more special characters
Creating Variables

Variables are containers for storing data values.

Unlike other programming languages, Python has no command for declaring a


variable.

A variable is created the moment you first assign a value to it.

Syntax:
x = 5
y = "John"
print(x)
print(y)

Output:
5

John
Variables do not need to be declared with any particular type and can even
change type after they have been set.

Syntax:
x = 4 # x is of type int
x = "Sally" # x is now of type str
print(x)

Output:

Sally

String variables can be declared either by using single or double quotes:

Syntax:

x = "John"
# is the same as
x = 'John'

Variable Names
A variable can have a short name (like x and y) or a more descriptive name
(age, carname, total_volume). Rules for Python variables:

 A variable name must start with a letter or the underscore character


 A variable name cannot start with a number
 A variable name can only contain alpha-numeric characters and
underscores (A-z, 0-9, and _ )
 Variable names are case-sensitive (age, Age and AGE are three different
variables)

Assign Value to Multiple Variables


Python allows you to assign values to multiple variables in one line:

Syntax:
x, y, z = "Orange", "Banana", "Cherry"
print(x)
print(y)
print(z)
Output:

Orange
Banana
Cherry

Output Variables
The Python print statement is often used to output variables.

To combine both text and a variable, Python uses the + character:

Syntax:

x = "awesome"
print("Python is " + x)

Output:
Python is awesome

You can also use the + character to add a variable to another variable:

Syntax:
x = "Python is "
y = "awesome"
z = x + y
print(z)

Output:
Python is awesome
Experiment Description: Exercise #1

Source Code
Write or paste print of code here. Attach extra page if needed.

OUTPUT
Draw out put or past screen shot of output screen here.
Experiment Description: Exercise #2

Source Code
Write or paste print of code here. Attach extra page if needed.

OUTPUT
Draw out put or past screen shot of output screen here.
Experiment Description: Exercise #3

Source Code
Write or paste print of code here. Attach extra page if needed.

OUTPUT
Draw out put or past screen shot of output screen here.
Experiment Description: Exercise #4

Source Code
Write or paste print of code here. Attach extra page if needed.

OUTPUT
Draw out put or past screen shot of output screen here.
Experiment Description: Exercise #5

Source Code
Write or paste print of code here. Attach extra page if needed.

OUTPUT
Draw out put or past screen shot of output screen here.
NOTE: Lab instructor ask students to practice lab from the given pool of exercises

LAB. EXERCISE NO.1

Develop / Write a program to assign values to different variables at the time of


declaration. Print the assigned values on the computer screen. Also print your
name.

LAB. EXCERSIE NO.2

Develop / Write a program to print the value that enter by user. Also use comments in
your code.

LAB. EXCERSIE NO.3

Develop / Write a program to print the following text:


Student Name:
Father Name:
Roll No:
Subject:
Semester:
Department Name:
University Name:

LAB. EXCERSIE NO.4

Develop / Write a program that ask number of different subjects then display on screen.
Also use comments in your code.

LAB. EXCERSIE NO.5

Develop / Write program that Get input of your name, address, age in years,
weight and height from keyboard and display this information. Also use
comments in your code.
Lab Activity 3

Python TypeCasting

Casting is when you convert a variable value from one type to another. This is, in Python, done
with functions such as int() or float() or str() . A very common pattern is that you convert a
number, currently as a string into a proper number.
We use type cast because python is only work with string as it take input from user string by default.
When we need other data type then we use type caste for required output to convert from one to other.

Syntax:
int()
float()
str()

Operators
Operators are used to perform operations on variables and values.

Python divides the operators in the following groups:

 Arithmetic operators
 Assignment operators
 Comparison operators
 Logical operators
 Identity operators
 Membership operators
 Bitwise operators
Arithmetic Operators
Arithmetic operators are used with numeric values to perform common
mathematical operations:
Assignment Operators
Assignment operators are used to assign values to variables:
Comparison Operators
Comparison operators are used to compare two values:

Logical Operators
Logical operators are used to combine conditional statements:
Identity Operators
Identity operators are used to compare the objects, not if they are equal, but if
they are actually the same object, with the same memory location:

Membership Operators
Membership operators are used to test if a sequence is presented in an object:
Bitwise Operators
Bitwise operators are used to compare (binary) numbers:

Strings
String Literals
String literals in python are surrounded by either single quotation marks, or
double quotation marks.

'hello' is the same as "hello".

You can display a string literal with the print() function:

Syntax:
#You can use double or single quotes:

print("Hello")

print('Hello')

Output:
Hello
Hello
Assign String to a Variable
Assigning a string to a variable is done with the variable name followed by an
equal sign and the string:

Syntax:
a = "Hello"
print(a)
Output:
Hello

Multiline Strings
You can assign a multiline string to a variable by using three quotes:

Syntax:
a = """Lorem ipsum dolor sit amet,
consectetur adipiscing elit,
sed do eiusmod tempor incididunt
ut labore et dolore magna aliqua."""
print(a)
Output:
Lorem ipsum dolor sit amet,
consectetur adipiscing elit,
sed do eiusmod tempor incididunt
ut labore et dolore magna aliqua.

Slicing
You can return a range of characters by using the slice syntax.

Specify the start index and the end index, separated by a colon, to return a part
of the string.

Syntax:

#Get the characters from position 2 to position 5 (not included):


b = "Hello, World!"
print(b[2:5])

Output:
llo

Negative Indexing
Get the characters from position 5 to position 1, starting the count from the end
of the string:

Syntax:

b = "Hello, World!"
print(b[-5:-2])

Output:
orl

String Length
To get the length of a string, use the len() function.

The len() function returns the length of a string:

Syntax:

a = "Hello, World!"
print(len(a))

Output:
13
String Methods
Python has a set of built-in methods that you can use on strings.

The strip() method removes any whitespace from the beginning or the end:

Syntax:
a = " Hello, World! "
print(a.strip()) # returns "Hello, World!"

The lower() method returns the string in lower case:

Syntax:

a = "Hello, World!"
print(a.lower()) # returns "hello, world!"

The upper() method returns the string in upper case:

Syntax:

a = "Hello, World!"
print(a.upper()) # returns "HELLO, WORLD!"

The replace() method replaces a string with another string:

Syntax:

a = "Hello, World!"
print(a.replace("H", "J")) # returns "Jello, World!"

Learn more about String Methods with our String Methods Reference
String Concatenation
To concatenate, or combine, two strings you can use the + operator.

Syntax:

Merge variable a with variable b into variable c:

a = "Hello"
b = "World"
c = a + b
print(c)

Output:

HelloWorld

Another Example

To add a space between them, add a " ":

Syntax:

a = "Hello"
b = "World"
c = a + " " + b
print(c)

Output:

Hello World
Experiment Description: Exercise #1

Source Code
Write or paste print of code here. Attach extra page if needed.

OUTPUT
Draw out put or past screen shot of output screen here.
Experiment Description: Exercise #2

Source Code
Write or paste print of code here. Attach extra page if needed.

OUTPUT
Draw out put or past screen shot of output screen here.
Experiment Description: Exercise #3

Source Code
Write or paste print of code here. Attach extra page if needed.

OUTPUT
Draw out put or past screen shot of output screen here.
Experiment Description: Exercise #4

Source Code
Write or paste print of code here. Attach extra page if needed.

OUTPUT
Draw out put or past screen shot of output screen here.
Experiment Description: Exercise #5

Source Code
Write or paste print of code here. Attach extra page if needed.

OUTPUT
Draw out put or past screen shot of output screen here.
Lab Activity 4

Collections (Arrays)
There are four collection data types in the Python programming language:

 List is a collection which is ordered and changeable. Allows duplicate


members.
 Tuple is a collection which is ordered and unchangeable. Allows duplicate
members.
 Set is a collection which is unordered and unindexed. No duplicate
members.
 Dictionary is a collection which is unordered, changeable and indexed.
No duplicate members.

When choosing a collection type, it is useful to understand the properties of that


type. Choosing the right type for a particular data set could mean retention of
meaning, and, it could mean an increase in efficiency or security.

List
A list is a collection which is ordered and changeable. In Python lists are written
with square brackets.

Create a List:

Syntax:

thislist = ["apple", "banana", "cherry"]


print(thislist)

Output:

['apple', 'banana', 'cherry']


Functions of Lists

Access Items
You access the list items by referring to the index number:

Print the second item of the list:

Syntax:

thislist = ["apple", "banana", "cherry"]


print(thislist[1])

Output:

Banana

Change Item Value


To change the value of a specific item, refer to the index number:

Change the second item:

Syntax:

thislist = ["apple", "banana", "cherry"]


thislist[1] = "blackcurrant"
print(thislist)

Output:

['apple', 'blackcurrant', 'cherry']


List Length
To determine how many items a list has, use the len() method:

Print the number of items in the list:

Syntax:

thislist = ["apple", "banana", "cherry"]


print(len(thislist))

Output:

3
Add Items
To add an item to the end of the list, use the append() method:

Using the append() method to append an item:

Syntax:

thislist = ["apple", "banana", "cherry"]


thislist.append("orange")
print(thislist)

Output:

['apple', 'banana', 'cherry', 'orange']

Remove Item
There are several methods to remove items from a list:

The remove() method removes the specified item:


Syntax:

thislist = ["apple", "banana", "cherry"]


thislist.remove("banana")
print(thislist)

Output:

['apple', 'cherry']

Copy a List
You cannot copy a list simply by typing list2 = list1, because: list2 will
only be a reference to list1, and changes made in list1 will automatically also
be made in list2.

There are ways to make a copy, one way is to use the built-in List
method copy().

Make a copy of a list with the copy() method:

Syntax:

thislist = ["apple", "banana", "cherry"]


mylist = thislist.copy()
print(mylist)

Output:

['apple', 'banana', 'cherry']

FOR MORE:
Do self study to explore more functions of Lists.
List Methods
Python has a set of built-in methods that you can use on lists.

Tuple
A tuple is a collection which is ordered and unchangeable. In Python tuples are
written with round brackets.

Create a Tuple:

Syntax:

thistuple = ("apple", "banana", "cherry")


print(thistuple)

Output:
('apple', 'banana', 'cherry')
Tuple Functions
Access Tuple Items
You can access tuple items by referring to the index number, inside square
brackets:

Print the second item in the tuple:

Syntax:

thistuple = ("apple", "banana", "cherry")


print(thistuple[1])

Output:

banana

Change Tuple Values


Once a tuple is created, you cannot change its values. Tuples
are unchangeable, or immutable as it also is called.

But there is a workaround. You can convert the tuple into a list, change the list,
and convert the list back into a tuple.

Convert the tuple into a list to be able to change it:

Syntax:

x = ("apple", "banana", "cherry")


y = list(x)
y[1] = "kiwi"
x = tuple(y)

print(x)

Output:

('apple', 'kiwi', 'cherry')


Tuple Length
To determine how many items a tuple has, use the len() method:

Print the number of items in the tuple:

Syntax:

thistuple = ("apple", "banana", "cherry")


print(len(thistuple))

Output:

Add Items
Once a tuple is created, you cannot add items to it. Tuples are unchangeable.

You cannot add items to a tuple:

Syntax:

thistuple = ("apple", "banana", "cherry")


thistuple[3] = "orange" # This will raise an error
print(thistuple)

Output:

TypeError: 'tuple' object does not support item assignment

Create Tuple With One Item


To create a tuple with only one item, you have add a comma after the item,
unless Python will not recognize the variable as a tuple.

One item tuple, remember the commma:

Syntax:
thistuple = ("apple",)
print(type(thistuple))

#NOT a tuple
thistuple = ("apple")
print(type(thistuple))

Output:

<class 'tuple'>

<class 'str'>

Remove Items
Tuples are unchangeable, so you cannot remove items from it, but you can
delete the tuple completely:

The del keyword can delete the tuple completely:

Syntax:

thistuple = ("apple", "banana", "cherry")


del thistuple
print(thistuple) #this will raise an error because the tuple no longer
exists

Output:

print(thistuple) #this will raise an error because the tuple no longer exists

FOR MORE:
Do self study to explore more functions of Touple.
Tuple Methods
Python has two built-in methods that you can use on tuples.

Lab Activity 5

Dictionary
A dictionary is a collection which is unordered, changeable and indexed. In
Python dictionaries are written with curly brackets, and they have keys and
values.

Create and print a dictionary:

Syntax:

thisdict = {
"brand": "Ford",
"model": "Mustang",
"year": 1964
}
print(thisdict)

Output:

{'brand': 'Ford', 'model': 'Mustang', 'year': 1964}

Dictionary Functions
Accessing Items
You can access the items of a dictionary by referring to its key name, inside
square brackets:

Get the value of the "model" key:

Syntax:

x = thisdict["model"]

Output:

{'brand': 'Ford', 'model': 'Mustang', 'year': 1964}

Change Values
You can change the value of a specific item by referring to its key name:

Change the "year" to 2018:

Syntax:

thisdict = {
"brand": "Ford",
"model": "Mustang",
"year": 1964
}
thisdict["year"] = 2018

print(thisdict)

Output:

{'brand': 'Ford', 'model': 'Mustang', 'year': 2018}


Check if Key Exists
To determine if a specified key is present in a dictionary use the in keyword:

Check if "model" is present in the dictionary:

Syntax:

thisdict = {
"brand": "Ford",
"model": "Mustang",
"year": 1964
}
if "model" in thisdict:
print("Yes, 'model' is one of the keys in the thisdict dictionary")

Output:

Yes, 'model' is one of the keys in the thisdict dictionary

Dictionary Length
To determine how many items (key-value pairs) a dictionary has, use
the len() method.

Print the number of items in the dictionary:

Syntax:

print(len(thisdict))

Output:
3
Adding Items
Adding an item to the dictionary is done by using a new index key and assigning
a value to it:

Syntax:

thisdict = {
"brand": "Ford",
"model": "Mustang",
"year": 1964
}
thisdict["color"] = "red"
print(thisdict)

Output:

{'brand': 'Ford', 'model': 'Mustang', 'year': 1964, 'color': 'red'}

Removing Items
There are several methods to remove items from a dictionary:

The pop() method removes the item with the specified key name:

Syntax:

thisdict = {
"brand": "Ford",
"model": "Mustang",
"year": 1964
}
thisdict.pop("model")
print(thisdict)

Output:

{'brand': 'Ford', 'year': 1964}


FOR MORE:
Do self study to explore more functions of Dictionary.

Dictionary Methods
Python has a set of built-in methods that you can use on dictionaries.
Set
A set is a collection which is unordered and unindexed. In Python sets are
written with curly brackets.

Create a Set:

Syntax:

thisset = {"apple", "banana", "cherry"}


print(thisset)

Output:

{'banana', 'apple', 'cherry'}

Note: Sets are unordered, so you cannot be sure in which order the items will
appear.

Set Functions
Access Items
You cannot access items in a set by referring to an index, since sets are
unordered the items has no index.

But you can loop through the set items using a for loop, or ask if a specified
value is present in a set, by using the in keyword.

Loop through the set, and print the values:

Syntax:

thisset = {"apple", "banana", "cherry"}


for x in thisset:
print(x)

Output:

apple
banana
cherry

Change Items
Once a set is created, you cannot change its items, but you can add new items.

Add Items
To add one item to a set use the add() method.

To add more than one item to a set use the update() method.

Add an item to a set, using the add() method:

Syntax:

thisset = {"apple", "banana", "cherry"}

thisset.add("orange")

print(thisset)

Output:

{'banana', 'apple', 'orange', 'cherry'}

Get the Length of a Set


To determine how many items a set has, use the len() method.

Get the number of items in a set:

Syntax:
thisset = {"apple", "banana", "cherry"}

print(len(thisset))

Output:
3

Remove Item
To remove an item in a set, use the remove(), or the discard() method.

Remove "banana" by using the remove() method:

Syntax:

thisset = {"apple", "banana", "cherry"}

thisset.remove("banana")

print(thisset)

Output:

SyntaxError: invalid syntax

Note: If the item to remove does not exist, remove() will raise an error.

FOR MORE:
Do self study to explore more functions of Sets.
Set Methods
Python has a set of built-in methods that you can use on sets.
Lab Activity 6

Conditions and If statements


Python supports the usual logical conditions from mathematics:

 Equals: a == b
 Not Equals: a != b
 Less than: a < b
 Less than or equal to: a <= b
 Greater than: a > b
 Greater than or equal to: a >= b

These conditions can be used in several ways, most commonly in "if


statements" and loops.

An "if statement" is written by using the if keyword.

If statement:

a = 33
b = 200
if b > a:
print("b is greater than a")

S-ar putea să vă placă și