
PYTHON 203
Presentation
•
Science, Computers
•
University
•
Hard
Dr. Rahman
Used 20+ times
FREE Resource
10 Slides • 28 Questions
1
PYTHON 203
DR Farzana Rahman
2
Python Introduction
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.
Some text here about the topic of discussion
3
Python USE
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.
Some text here about the topic of discussion
4
Python language compared to other programming languages
Python works on different platforms (Windows, Mac, Linux, Raspberry Pi, etc) and 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.
Python can be treated in a procedural way, an object-oriented way or a functional way.
Some text here about the topic of discussion
5
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.
Some text here about the topic of discussion
6
Multiple Choice
How python syntax defines a scope
using indication
using semicolon
using bracket
using colon
7
PYTHON WITH GOOGLE COLAB
Some text here about the topic of discussion.
8
PYTHON SYNTAX
Some text here about the topic of discussion.
9
Multiple Choice
Which sign python uses to complete a command ?
semicolon
parentheses
colon
new line
10
COMMETS
Comments starts with a #, and Python will ignore them.
Python does not really have a syntax for multi line comments.
To add a multiline comment you could insert a # for each line.
Since Python will ignore string literals that are not assigned to a variable, you can add a multiline string (triple quotes) in your code, and place your comment inside it (CHECK EXAMPLE)
Some text here about the topic of discussion
11
Multiple Choice
What is the Python syntax for multiline comment?
#
##
//
No Syntax
12
Multiple Choice
Select the correct answer
A variable is created the moment you declare the type
Variables are needed to be declared with particular type
A variable is created the moment you first assign a value to it
Python has specific command for declaring a variable.
13
Multiple Choice
Which Variable name is right?
7myclass
my_class
my-class
my class
14
Multiple Choice
The most common python output function is-
printf()
print()
cout()
cin()
15
Multiple Choice
In a python code global variable can be used -
inside a function
outside a function
in a specific function
both inside and outside of a function
16
Multiple Select
Select the built in data types of python? You can choose multiple answers
integer
float
character
complex
17
Multiple Select
Which one are right syntax to define string data type in python? You can choose multiple answers
x="Hello"
x=["Hello"]
x='Hello'
x={Hello}
18
Multiple Choice
X="HELLO_PYTHON"
print(x[3:8]) command outputs
LLO_PY
LO_PY
LO_PYT
O_PYT
19
Multiple Choice
x = "Hellopython"
print(x[:5]) output is
Hello
ellop
Hellop
ellopy
20
Multiple Choice
x = "Hipython"
print(x[3:]) outputs
python
ython
thon
ipython
21
Multiple Choice
x = "Hello_Students!"
print(b[-8:-2]) outputs
tudents!
tudents
student
tudent
22
List, Tuple, SET,Dictionary
Some text here about the topic of discussion.
23
Multiple Select
(You can choose multiple answer)
Properties of LIST-
Ordered
Changeable
accept duplicates
unchangable
24
Multiple Choice
How can we Add item in specific location of a List
using add() function
using append() function
Using insert() function
25
Multiple Select
You can choose multiple answer)
Properties of TUPLE-
Ordered
Changeable
accept duplicates
unchangable
26
Multiple Choice
HOw can we add element in a Tuple
using append () function
changing tuple to list
using insert() function
using update() function
27
Multiple Select
(You can choose multiple answer)
Properties of SET-
Ordered
Changeable
accept duplicate
unchangable
28
Multiple Select
(you can choose multiple Answers)
How can we add elements in set
add() function
append() function
update() function
insert() function
29
Multiple Choice
Which one is true
we can add and remove item from sets
We can add and remove item from tuple
We cannot have duplicate item in list
Set items are ordered and indexed
30
Multiple Choice
Which one is immutable
List
Tuple
SET
both List and Tuple
31
Multiple Select
(You can choose multiple answer)
Properties of Dictionary-
Ordered
Changeable
accept duplicate
unchangable
32
Multiple Select
which method are used to access keys in dictionary
[you can select multiple answer]
get()
keys()
find()
in()
33
Multiple Select
What update method can do
[you can select multiple answer]
update value
update keys
update dictionary
add new value
34
Class
Some text here about the topic of discussion.
35
Multiple Choice
What keyword is used to define class?
myclass
newclass
class
makeclass
36
Multiple Choice
How to define a class?
Class Classname:
attributes
Class: Classnane
attributes
Classname Class:
attributes
37
Multiple Choice
How to initialise attribute information in Class
using define function
using
__init__
function
using
new function
using
attribute function
38
Multiple Choice
What is reference variable ?
A variable that is used to access attributes of the class
A variable that is used to access variables that belong to the class
A variable that is used to call class function
both 1st and 2nd choice.
PYTHON 203
DR Farzana Rahman
Show answer
Auto Play
Slide 1 / 38
SLIDE
Similar Resources on Wayground
31 questions
IYR
Presentation
•
KG - University
34 questions
A DEEP DIVE : GRAMMAR COVERED
Presentation
•
University
32 questions
Weather Fronts and Air Masses
Presentation
•
KG
32 questions
Integumentary System of a Frog
Presentation
•
University
32 questions
Java Programming 1 Unit 1
Presentation
•
University
32 questions
Thermodynamics
Presentation
•
University
31 questions
Equine Colic
Presentation
•
University
35 questions
OCE2001-Chapter 3 Lesson/Practice and Videos
Presentation
•
University
Popular Resources on Wayground
20 questions
STAAR Review Quiz #3
Quiz
•
8th Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
6 questions
Marshmallow Farm Quiz
Quiz
•
2nd - 5th Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
20 questions
Inferences
Quiz
•
4th Grade
19 questions
Classifying Quadrilaterals
Quiz
•
3rd Grade
12 questions
What makes Nebraska's government unique?
Quiz
•
4th - 5th Grade