• Wrong document? Swap it for free
  • Written by students who passed
  • Immediately available after payment
  • Read online or as PDF
Sell
Where do you study
Your language
Document preview thumbnail
Preview 2 out of 8 pages
Exam (elaborations)

CS 1101-01 AY2026-T2 Programming Assignment Unit 1 2026/2027 | Introduction to Programming Complete Solutions and Step-by-Step Study Guide

Document preview thumbnail
Preview 2 out of 8 pages

CS 1101-01 AY2026-T2 Programming Assignment Unit 1 2026/2027 | Introduction to Programming Complete Solutions and Step-by-Step Study Guide

Content preview

13/2026,
:15 AMCS1:58:15
10/13/2026,
1101-01
AMCS
- AY2026-T2
1:58:15
1101-01
AMCS
- Programming
AY2026-T2
1101-01 - Programming
AY2026-T2
AssignmentProgramming
Unit
Assignment
1(*((&#*!(*#*($$(*($(*$Y(&*&$(*)&*)((&$*^$&*&$
Unit
Assignment
1(*((&#*!(*#*($$(*($(*$Y(&*&$(*)&*)((&$*^$&*&$
Unit 1(*((&#*!(*#*($$(*($(*$Y(&*&$(*)&*)((&$*^$&*&$
(&*$ **F VJyvhjbnoP+_IREOLKDJ(UWRORWUOI
(&*$ **F VJyvhjbnoP+_IREOLKDJ(UWRORW
(&*$ **F VJyvhjbnoP+_IREOLKD




CS 1101-01 - AY2026-T2 / Programming Assignment Unit 1
Benjamin Ifeoluwa Adebayo
University of the People
CS 1001 - Programming Fundamentals
19th November, 2025



Part 1: Learn From My Mistakes


Question a: Printing my name


Code:

print("Benjamin Adebayo") # Correct
print('Benjamin Adebayo) # Missing one quote (will cause SyntaxError)
print(Benjamin Adebayo) # Missing both quotes (will cause NameError)




Explanation:

When printing text, Python requires quotes. Missing one quote causes SyntaxError: EOL while




13/2026,
:15 AMCS1:58:15
10/13/2026,
1101-01
AMCS
- AY2026-T2
1:58:15
1101-01
AMCS
- Programming
AY2026-T2
1101-01 - Programming
AY2026-T2
AssignmentProgramming
Unit
Assignment
1(*((&#*!(*#*($$(*($(*$Y(&*&$(*)&*)((&$*^$&*&$
Unit
Assignment
1(*((&#*!(*#*($$(*($(*$Y(&*&$(*)&*)((&$*^$&*&$
Unit 1(*((&#*!(*#*($$(*($(*$Y(&*&$(*)&*)((&$*^$&*&$
(&*$ **F VJyvhjbnoP+_IREOLKDJ(UWRORWUOI
(&*$ **F VJyvhjbnoP+_IREOLKDJ(UWRORW
(&*$ **F VJyvhjbnoP+_IREOLKD

,13/2026,
:15 AMCS1:58:15
10/13/2026,
1101-01
AMCS
- AY2026-T2
1:58:15
1101-01
AMCS
- Programming
AY2026-T2
1101-01 - Programming
AY2026-T2
AssignmentProgramming
Unit
Assignment
1(*((&#*!(*#*($$(*($(*$Y(&*&$(*)&*)((&$*^$&*&$
Unit
Assignment
1(*((&#*!(*#*($$(*($(*$Y(&*&$(*)&*)((&$*^$&*&$
Unit 1(*((&#*!(*#*($$(*($(*$Y(&*&$(*)&*)((&$*^$&*&$
(&*$ **F VJyvhjbnoP+_IREOLKDJ(UWRORWUOI
(&*$ **F VJyvhjbnoP+_IREOLKDJ(UWRORW
(&*$ **F VJyvhjbnoP+_IREOLKD




scanning string literal, while missing both quotes treats it as a variable, giving a NameError.

Strings must always be enclosed in quotes to be recognized correctly.




Question b: Difference between * and ** operators


Code:


result_mult = 5 * 3
result_exp = 5 ** 3
print("5 * 3 =", result_mult)
print("5 ** 3 =", result_exp)




Explanation:

* multiplies numbers normally, while ** raises the base to the power of the exponent.




13/2026,
:15 AMCS1:58:15
10/13/2026,
1101-01
AMCS
- AY2026-T2
1:58:15
1101-01
AMCS
- Programming
AY2026-T2
1101-01 - Programming
AY2026-T2
AssignmentProgramming
Unit
Assignment
1(*((&#*!(*#*($$(*($(*$Y(&*&$(*)&*)((&$*^$&*&$
Unit
Assignment
1(*((&#*!(*#*($$(*($(*$Y(&*&$(*)&*)((&$*^$&*&$
Unit 1(*((&#*!(*#*($$(*($(*$Y(&*&$(*)&*)((&$*^$&*&$
(&*$ **F VJyvhjbnoP+_IREOLKDJ(UWRORWUOI
(&*$ **F VJyvhjbnoP+_IREOLKDJ(UWRORW
(&*$ **F VJyvhjbnoP+_IREOLKD

Document information

Uploaded on
October 13, 2026
Number of pages
8
Written in
2026/2027
Type
Exam (elaborations)
Contains
Questions & answers
$10.99

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.
filwe1099salmin
4.6
(245)
Sold
4941
Followers
117
Items
2163
Last sold
1 day ago



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

Working on your references?

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

Working on your references?

Frequently asked questions