100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
Study Guides Questions and Answers £10.89
Add to cart

Exam (elaborations)

Study Guides Questions and Answers

 2 views  0 purchase
  • Module
  • PTS
  • Institution
  • PTS

Study Guides Questions and Answers What is one similarity between print () and input()? Print & input similarity + 4 pts Both generate a string output + 4 pts Both built-in or standard library functions + 4 pts Correct, other than above + 1 pts Attempted but mostly incorrect or too vague + 0...

[Show more]

Preview 1 out of 4  pages

  • January 5, 2025
  • 4
  • 2024/2025
  • Exam (elaborations)
  • Questions & answers
  • PTS
  • PTS
avatar-seller
Study Guides Questions and Answers

What is one similarity between print () and input()? - answer Print & input similarity
+ 4 pts Both generate a string output
+ 4 pts Both built-in or standard library functions
+ 4 pts Correct, other than above
+ 1 pts Attempted but mostly incorrect or too vague
+ 0 pts Completely wrong or Blank
- 2 pts Too Vague
- 1 pts Mistake
- 0.5 pts Minor mistake

Whenever the Python interpreter needs to evaluate a name(of a variable, function,
etc...), it searched for the name definition in this order:
1: __________
2: __________
3: __________ - answer Three from the following 4:
+ 1.5 pts Local
+ 1.5 pts Global
+ 1.5 pts Module Import
+ 1.5 pts Built-in

Order of Answers:
+ 1.5 pts Correct Order
+ 1 pts Partial Correct Order

Explain the differences between 'import math' and 'from math import sqrt' or 'from math
import*' - answer import math vs from math import */sqrt
+ 5 pts "Import math" and "From math import *" import all the functions/objects of the
module while "from module import sqrt" imports the specific function/object. "From math
import *" and "From math import sqrt" allow the object to be referred to without including
the module from which it was imported, which might lead to pollution of the namespace.
+ 4 pts Partially Correct. Did not correctly explain the meaning of from math import sqrt
or *

What is the main difference between print () and return? Given an example. - answer
Print vs Return
+ 2 pts Explain print
+ 2 pts Explain return
+ 2 pts Print example
+ 2 pts return example
+ 0 pts Blank

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 Pogba119. Stuvia facilitates payment to the seller.

Will I be stuck with a subscription?

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

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

50990 documents were sold in the last 30 days

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

Start selling
£10.89
  • (0)
Add to cart
Added