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

CS101 PYTHON TEST 2025

Rating
-
Sold
-
Pages
4
Uploaded on
04-01-2025
Written in
2024/2025

CS101 PYTHON TEST 2025....

Institution
CS101 PYTHON
Course
CS101 PYTHON

Content preview

While loops - ANSWER -executes a series of steps while some condition is
true
-the test (part between the parentheses) returns either true or false
-loop continues until the test returns false
-while loops are used when we don't know how many times we need to repeat
the steps... it relies on an external condition
Ex: while (there are still lines in a file)
read the next line
print the line out

For Loops - ANSWER - executes a series steps of steps a finite amount of
times-text evaluates a counter, when it reaches the last value, the loop stops
repeating-we use a for loop when we know ahead of time how many times, we
need to repeat the stepsEx: for (count = 1 to 12)do a stepdo another stepincrease
the count by one

print() - ANSWER a built-in function to display on screen in Python

String - ANSWER set of characters represented in quotation marks

int(x) - ANSWER to convert x to a plain integer

float(x) - ANSWER to convert x to a floating-point number.

Variables - ANSWER are assigned values using the '=' operator, which is not
to be confused with the '==' sign used for testing equality. A variable can hold
almost any type of value such as lists, dictionaries, functions.
Ex: >> x = 12 12

Functions - ANSWER Python builds ___ using the syntax:
def function_name(variable): Functions can be stand-alone or can return values.
Functions can also contain other functions.
Ex: def add_two(a, b): c=a+b

Written for

Institution
CS101 PYTHON
Course
CS101 PYTHON

Document information

Uploaded on
January 4, 2025
Number of pages
4
Written in
2024/2025
Type
Exam (elaborations)
Contains
Unknown

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.
Boostertips Chamberlain College Nursing
View profile
Follow You need to be logged in order to follow users or courses
Sold
261
Member since
3 year
Number of followers
195
Documents
5175
Last sold
2 weeks ago

3.8

44 reviews

5
19
4
8
3
10
2
2
1
5

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