BUS 104 PYTHON EXAM STUDY GUIDE:
Weekly Quizzes well answered to
pass(7)
Which Python function can only provide output to the user? - correct answer ✔✔print()
In the following line of Python code, what is the argument to the input function?
user_status = input("How are you today?") - correct answer ✔✔"How are you today?"
Which of the following items is a string? - correct answer ✔✔"E1E10"
In Python, you cannot perform mathematical calculations with variables of type float. - correct answer
✔✔False
Which of the following would display the number 9 as output? - correct answer ✔✔print(round(9.2))
Which of the following Python operators finds the remainder in a division? - correct answer ✔✔%
In order to use certain math functions such as trunc(), one must: - correct answer ✔✔Import the
functions from the math library
What is the difference between simple interest and compound interest? - correct answer ✔✔Compound
interest earns interest on interest received in previous periods, while simple interest does not
What is displayed with the following code is run?
my_balance = 100
, my_balance += 2 * 3 + 1
print (my_balance) - correct answer ✔✔107
In the future value formula:
F = I(1 + r)t
the variable I represents: - correct answer ✔✔The initial investment
When doing math in Python, it is helpful to use parentheses to - correct answer ✔✔eliminate ambiguity
Which of the following statements would raise the value of variable my_num to the power of 2? - correct
answer ✔✔1) my_num = my_num * my_num
2) my_num *= my_num
3) my_num = my_num**2
What is displayed when the following code is run?
a_dog = "fido"
two_dogs = a_dog + 1
print (two_dogs) - correct answer ✔✔Nothing, the code contains an error
The following code is intended to add one to the user's current age and then display it. What is the error
in the code?
current_age = input("Please enter your current age:")
current_age = current_age + 1
print("Your age next year will be " + str(current_age)) - correct answer ✔✔You must convert current_age
to a number before adding 1 to it
The benefits of buying summaries with Stuvia:
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
You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.
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 Sakayobako30. Stuvia facilitates payment to the seller.
Will I be stuck with a subscription?
No, you only buy these notes for $12.99. You're not tied to anything after your purchase.