• Wrong document? Swap it for free
  • Written by students who passed
  • Immediately available after payment
  • Read online or as PDF
Sell
Where do you study
Your language
Document preview thumbnail
Preview 3 out of 17 pages
Exam (elaborations)

ITP 150 - Python Midterm Study Guide Questions With Correct Answers

Document preview thumbnail
Preview 3 out of 17 pages

ITP 150 - Python Midterm Study Guide Questions With Correct Answers

Content preview

ITP 150 - Python Midterm Study Guide
Questions With Correct Answers

What is a python built in function and some examples?
| | | | | | | | |




It is a function that is built-into the core Python language. Some
| | | | | | | | | | | |



common built-in functions include: print, input, and type
| | | | | | |




function definition |




a function is a block of code which only runs when it is called. You can
| | | | | | | | | | | | | | | |



pass data, known as parameters. A function can return data as a resul.
| | | | | | | | | | | |




How to create and call a function with arguments
| | | | | | | |




def test_names(first_name, sec_name):
| |




print("Hello", first_name, "and", sec_name) | | |




my_function(Mary, Claire) |




parameter or argument | |

,a variable listed inside the parentheses in the function definition
| | | | | | | | |




What is the standard python coding style
| | | | | |




snake case - lower case+underscores
| | | |




str: joe, int: 7, float: 3.90, bool: true,
| | | | | | |




name = "Joe" | |




num = 7 | |




dec = 3.90
| |




reg = True
| |




What data type is the console data/input() function
| | | | | | |




it is always a string data type however we can change this
| | | | | | | | | | |




Change the input into different data types: input("Enter age")
| | | | | | | |




str(input("Enter age")) |




int(input("Enter age")) |

,float(input("Enter age"))
|




bool(input("Enter age"))
|




True or False: Variables cannot begin with a number
| | | | | | | |




True




True or False: Python is an interpreted language
| | | | | | |




True




True or False: Python is case-sensitive
| | | | |




True




True or False: Variables names can have spaces
| | | | | | |




False




True or False: This is a proper variable name 1value
| | | | | | | | |

Document information

Uploaded on
November 28, 2026
Number of pages
17
Written in
2026/2027
Type
Exam (elaborations)
Contains
Questions & answers
$14.49

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
Lectphilip
4.0
(46)
Sold
319
Followers
8
Items
28167
Last sold
2 hours ago



Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions