Visual Programming I - INF1511 Latest exam pack questions and answers and summarized notes for exam preparation. Updated for 2025. For assistance call or W.h.a.t.s.a.p.p us on +/ 2/ 5/ 4 /7 /7 /9 /5 /4 /0 /1 /3 /2 .
The command line is used to execute Python code ____ .
a.
each line dynamically
b.
one line at a time
c.
multiple lines simultaneously
d.
multiple lines sequentially
Question 2
Question text
If the data type of a value in a variables does not match the format code,
then ____ will occur.
a.
an exception
b.
an event handler
, lOMoARcPSD|21997160
c.
an auto conversion
d.
an error message
Question 3
Question text
For the provided input, what is the output?
#This is the input
a=int(input('Please enter the number of masks issued to the school : '))
b=int(input('Please enter the number of learners in the school: '))
#this is the processing
thetotal=a//b
theremain=a%b
#this is the output
print('Each learner receives : ', thetotal)
print('The remainder is:', theremain)
a.
Please enter the number of masks issued to the school : 300
Please enter the number of learners in the school: 900
Each learner receives : 0
The remainder is: 300
b.
Please enter the number of masks issued to the school : 300
Please enter the number of learners in the school: 900
Each learner receives : 30
The remainder is: 3
c.
Please enter the number of masks issued to the school : 300
Please enter the number of learners in the school: 900
Downloaded by Thomas Mboya (thomasmboya550@gmail.com)
, lOMoARcPSD|21997160
Each learner receives : 3
The remainder is: 0
d.
Please enter the number of masks issued to the school : 300
Please enter the number of learners in the school: 900
Each learner receives : 300
The remainder is: 0
Question 4
Question text
The print() function prints a new line. Which one of the following print()
commands includes characters that will supress the printing of a new line?
a.
print (‘Good luck’, end == ‘ ’ )
b.
print (‘Good luck’, end = ‘ ’ )
c.
print (‘Good luck’, nl/// )
d.
print (‘Good luck’, end )
Question 5
Question text
What is the output from the code executed?
#add 2 numbers and show the result
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 LIBRARYpro. Stuvia facilitates payment to the seller.
Will I be stuck with a subscription?
No, you only buy these notes for $2.71. You're not tied to anything after your purchase.