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

INF1511 ASSIGNMENT 5 SEMESTER 1 2024 QUESTION AND SOLUTIONS DISTINCTION GUARANTEE

Rating
-
Sold
1
Pages
10
Grade
A+
Uploaded on
11-07-2024
Written in
2023/2024

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

Institution
Course









Whoops! We can’t load your doc right now. Try again or contact support.

Written for

Institution
Course

Document information

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

Subjects

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

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.
mabogwaneboitumelo724 Teachme2-tutor
Follow You need to be logged in order to follow users or courses
Sold
38
Member since
2 year
Number of followers
23
Documents
32
Last sold
11 months ago

3.5

4 reviews

5
2
4
0
3
1
2
0
1
1

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