100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
(COSC 1315) Introduction to Computer Science: Mid-Term Review £9.37   Add to cart

Exam (elaborations)

(COSC 1315) Introduction to Computer Science: Mid-Term Review

 0 view  0 purchase

(COSC 1315) Introduction to Computer Science: Mid-Term Review A(n) ______ Structure is a logical design that controls the order in which a set of statements execute. - correct answer Control What is a group of statements that exist within a program for the purpose of performing a specific ...

[Show more]

Preview 2 out of 9  pages

  • February 8, 2024
  • 9
  • 2023/2024
  • Exam (elaborations)
  • Questions & answers
All documents for this subject (11)
avatar-seller
RevisionKing
(COSC 1315) Introduction to Computer
Science: Mid-Term Review

A(n) ______ Structure is a logical design that controls the order in which a set of statements
execute. - correct answer Control


What is a group of statements that exist within a program for the purpose of performing a
specific task? - correct answer A Function


A set of statements that belong together as a group and contribute to the function definition is
known as a... - correct answer Block


A value-returning function is... - correct answer a function that will return a value back to the
part of the program that called it.


After the execution of the following statement, the variable *sold* will refrence the numeric
literal value as(n) ______ data type.


sold = 256.752 - correct answer Float (Because there are decimal points)


What is the output of the following command, given that *value1 = 2.0* and *value2 = 12*?
print(value1 * value2) - correct answer 24.0 (.0 because value1 has .0 at the end so the
computer wants to include that as well)


Which of the following will assign a random integer in the range of 1 thought 50 to the variable
number? - correct answer number = random.randint(1, 50)

, When using the ______ logical operator, one or both of the sub-expressions must be true for
the compound expression to be true. - correct answer or


what will be assigned to the variable *s_string* after the following code executes?


special = "1357 Country Ln."
s_string = special [-3:] - correct answer "Ln." (When using a - in a string, it takes the LAST terms
instead of the first)


The Python library functions that are built into the Python ______ can be used by simply calling
the required function. - correct answer interpreter


The following is an example of an instruction written in which computer language?
*10110000* - correct answer Machine Language


The ______ of a local variable is the function in which that variable is created. - correct answer
Scope


What type of loop structure repeats the code based on the value of Boolean expression? -
correct answer condition-controlled loop


The ______ function reads a piece of data that has been entered at the keyboarded and returns
that piece of data, as a string, back to the program. - correct answer input()


A(n) ______ is any piece of data that is passed into a function when the function is called. -
correct answer Argument


What does the following program do?

The benefits of buying summaries with Stuvia:

Guaranteed quality through customer reviews

Guaranteed quality through customer reviews

Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.

Quick and easy check-out

Quick and easy check-out

You can quickly pay through credit card for the summaries. There is no membership needed.

Focus on what matters

Focus on what matters

Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!

Frequently asked questions

What do I get when I buy this document?

You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.

Satisfaction guarantee: how does it work?

Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.

Who am I buying these notes from?

Stuvia is a marketplace, so you are not buying this document from us, but from seller RevisionKing. Stuvia facilitates payment to the seller.

Will I be stuck with a subscription?

No, you only buy these notes for £9.37. You're not tied to anything after your purchase.

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

75632 documents were sold in the last 30 days

Founded in 2010, the go-to place to buy revision notes and other study material for 14 years now

Start selling
£9.37
  • (0)
  Add to cart