Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4,6 TrustPilot
logo-home
Document preview thumbnail
Preview 2 out of 10 pages
Exam (elaborations)

INF1511 ASSIGNMENT 5 SEMESTER 1 2024 QUESTION AND SOLUTIONS DISTINCTION GUARANTEE

Document preview thumbnail
Preview 2 out of 10 pages

INF1511 ASSIGNMENT 5 SEMESTER 1 2024 QUESTION AND SOLUTIONS DISTINCTION GUARANTEED!

Content preview

Assessment 5
Open course
Started on Thursday, 11 July 2024, 5:59 AM
State Finished
Completed on Friday, 11 July 2024, 6:22 AM
Time taken 22 mins 42 secs
Marks 14.00/15.00
Grade 93.33 out of 100.00
Question 1
Complete
Not graded

Flag question

Question text


Marked out of 1.00



What code is generated when the following code is executed?

def myPet(pType,pName):

print('I have a %s named %s.' %(pType.lower(), pName.title()))



petType = str(input("What type of pet do you have? "))

petName = str(input("What is the name of your pet? "))

myPet(petType, petName)



a.What type of pet do you have? CAT

What is the name of your pet? FRED

I have a CAT named FRED.



b.What type of pet do you have? CAT

What is the name of your pet? FRED

, I have a cat named Fred.



c.What type of pet do you have? CAT

What is the name of your pet? FRED

I have a Cat named Fred.



d.What type of pet do you have? CAT

What is the name of your pet? FRED

I Have A Cat Named Fred.



Question 2



The variables in the function that receive the arguments are called _____.



a.globals



b.modules



c.parameters



d.returns



Question 3

A _____ function is a function that is small (usually only a single line), and is used only once.

a.argument

b.module

Document information

Uploaded on
July 11, 2024
Number of pages
10
Written in
2023/2024
Type
Exam (elaborations)
Contains
Questions & answers
R60,00

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

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.
Sold
39
Followers
23
Items
32
Last sold
2 months ago



Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their exams and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can immediately select a different document that better matches what you need.

Pay how you prefer, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card or EFT and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions