100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.2 TrustPilot
logo-home
Exam (elaborations)

CS 101 Terms Review (Midterm 2) Questions and Answers Already Passed

Rating
-
Sold
-
Pages
2
Grade
A+
Uploaded on
14-12-2025
Written in
2025/2026

CS 101 Terms Review (Midterm 2) Questions and Answers Already Passed + - Answers addition (i.e. 4+5 = 9) - - Answers subtraction (i.e. 9-5 = 4) * - Answers multiplication (3*5 = 15) / and // - Answers division (6/3 = 2.0; 6/4 = 1.5; 6//4 = 1) % - Answers mod/remainder (5%3 = 2) ** - Answers exponentiation (3**2 = 9) + (strings) - Answers concatenation ("ab" + "cd" = "abcd") * (strings) - Answers repeat ("xo"*3 = "xoxoxo") == - Answers is equal to (3 == 3 is True) != - Answers is not equal to (3 != 3 is False) >= - Answers is greater than or equal to (4>=3 is True) <= - Answers is less than or equal to (4<=3 is False) > - Answers is strictly greater than (4>3 is True) < - Answers is strictly less than (4<3 is False) not - Answers negates the value of a bool (not x==5 is False) and - Answers returns True only if both statements are True (x>3 and x<7 is True if x==5) or - Answers returns True if at least one statement is true (x>3 or x>7 is True if x==5) int(x) - Answers makes x an integer --> int(5.8) = 5; int("123") = 123; int("abc") = error float(x) - Answers makes x a decimal --> float("2.46") = 2.46; float(4) = 4.0; float("abc") = error str(x) - Answers makes x a string --> str(432) = "432"; type(x) - Answers returns type of x --> type(1) = int; type(1.2) = float s[x] - Answers returns the index of a character (i.e. colorful: s[0] = 'c', s[-3] = 'f' s[x:y] - Answers splices and returns parts of string between indexes (i.e. colorful: s[4:-1] = 'rfu')

Show more Read less
Institution
CS 101
Course
CS 101








Whoops! We can’t load your doc right now. Try again or contact support.

Written for

Institution
CS 101
Course
CS 101

Document information

Uploaded on
December 14, 2025
Number of pages
2
Written in
2025/2026
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

Content preview

CS 101 Terms Review (Midterm 2) Questions and Answers Already Passed

+ - Answers addition (i.e. 4+5 = 9)

- - Answers subtraction (i.e. 9-5 = 4)

* - Answers multiplication (3*5 = 15)

/ and // - Answers division (6/3 = 2.0; 6/4 = 1.5; 6//4 = 1)

% - Answers mod/remainder (5%3 = 2)

** - Answers exponentiation (3**2 = 9)

+ (strings) - Answers concatenation ("ab" + "cd" = "abcd")

* (strings) - Answers repeat ("xo"*3 = "xoxoxo")

== - Answers is equal to (3 == 3 is True)

!= - Answers is not equal to (3 != 3 is False)

>= - Answers is greater than or equal to (4>=3 is True)

<= - Answers is less than or equal to (4<=3 is False)

> - Answers is strictly greater than (4>3 is True)

< - Answers is strictly less than (4<3 is False)

not - Answers negates the value of a bool (not x==5 is False)

and - Answers returns True only if both statements are True (x>3 and x<7 is True if x==5)

or - Answers returns True if at least one statement is true (x>3 or x>7 is True if x==5)

int(x) - Answers makes x an integer --> int(5.8) = 5; int("123") = 123; int("abc") = error

float(x) - Answers makes x a decimal --> float("2.46") = 2.46; float(4) = 4.0; float("abc") = error

str(x) - Answers makes x a string --> str(432) = "432";

type(x) - Answers returns type of x --> type(1) = int; type(1.2) = float

s[x] - Answers returns the index of a character (i.e. colorful: s[0] = 'c', s[-3] = 'f'

s[x:y] - Answers splices and returns parts of string between indexes (i.e. colorful: s[4:-1] = 'rfu')

.find(str) - Answers finds index of first occurrence, -1 if not there (i.e. s = 'colorful': s.find('o') = 1)

Get to know the seller

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.
TutorJosh Chamberlain College Of Nursing
View profile
Follow You need to be logged in order to follow users or courses
Sold
347
Member since
1 year
Number of followers
16
Documents
28842
Last sold
1 day ago
Tutor Joshua

Here You will find all Documents and Package Deals Offered By Tutor Joshua.

3.6

55 reviews

5
19
4
14
3
12
2
0
1
10

Recently viewed by you

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

Frequently asked questions