1st Year Computer Chapter # 2 Online Test (Punjab Board)

1st year computer online Test

1st Year Computer Chapter 2 Online Test (2026-2027 New Syllabus)
Punjab Board | ICS Part 1 | Annual Exam 2027 Preparation

Are you preparing for your 11th Class Computer Science exams for the 2026-2027 academic year? The Punjab Board has implemented a completely new syllabus! Take our Free Online Test for Chapter 1 to master the updated curriculum and ace your ICS Part 1 exams for Session 2026-2027.

This interactive MCQ test is designed specifically for students following the Punjab Textbook Board (PTB) New Book (2026-2027 Edition)

Why take this “2026-2027 Syllabus” Online Test?
  • Board Exam Pattern: Questions are aligned with the new paper pattern of BISE Lahore, Multan, Faisalabad, Rawalpindi, Sahiwal, Sargodha, Gujranwala, DG Khan, and Bahawalpur.
  • Annual Exam 2027 Preparation: Perfect for students appearing in the 2027 Annual Exams?

1st Year Computer Chapter # 2

❗️Online Test Instructions

📘 Type: MCQs ❓
Total Questions: 109✅
Total Marks: 109 🕒
Time Allowed: Each question has a 1minut time limit.
🔀 Questions will be shuffled each time you start the test.
❌ You can not skip any question.
✔️ Once you are finished, click the See Results button.

1 / 108

Tags: Chap 2 1st year computer

1) Output if executed directly:
def main(): print("This is the main function.")
if __name__ == "__main__": main()

2 / 108

Tags: Chap 2 1st year computer

2) Role of __name__ in if __name__ == "__main__": main()?

3 / 108

Tags: Chap 2 1st year computer

3) Why use main() function?

4 / 108

Tags: Chap 2 1st year computer

4) If __name__ == "__main__" is not used?

5 / 108

Tags: Chap 2 1st year computer

5) What is modular programming?

6 / 108

Tags: Chap 2 1st year computer

6) Output of:
my_tuple = (1,2,3,"Hello",4.5)
print(len(my_tuple))

7 / 108

Tags: Chap 2 1st year computer

7) Immutable data structure?

8 / 108

Tags: Chap 2 1st year computer

8) Negative indexing allows?

9 / 108

Tags: Chap 2 1st year computer

9) Difference between list and tuple?

10 / 108

Tags: Chap 2 1st year computer

10) Output of:
fruits = ["Apple","Banana","Cherry","Date"]
print(fruits[1:3])

11 / 108

Tags: Chap 2 1st year computer

11) Concatenate two lists?

12 / 108

Tags: Chap 2 1st year computer

12) remove() method?

13 / 108

Tags: Chap 2 1st year computer

13) sort() on a list?

14 / 108

Tags: Chap 2 1st year computer

14) Output of:
numbers = [1,2,3,4,5]
slice = numbers[1:4]
extra = [6,7]
combined = slice + extra
print(combined)

15 / 108

Tags: Chap 2 1st year computer

15) Slicing numbers[1:4] does what?

16 / 108

Tags: Chap 2 1st year computer

16) Output of:
fruits = ["Mango","Apple","Banana"]
fruits.sort()
print(fruits)

17 / 108

Tags: Chap 2 1st year computer

17) Remove item from list?

18 / 108

Tags: Chap 2 1st year computer

18) Access second item?

19 / 108

Tags: Chap 2 1st year computer

19) Add item to end of list?

20 / 108

Tags: Chap 2 1st year computer

20) Output of:
fruits = ["Mango", "Apple", "Banana"]
fruits[0] = "Orange"
fruits.append("Pineapple")
print(fruits)

21 / 108

Tags: Chap 2 1st year computer

21) Combine two lists?

22 / 108

Tags: Chap 2 1st year computer

22) Call function from module inside package?

23 / 108

Tags: Chap 2 1st year computer

23) Correct package structure?

24 / 108

Tags: Chap 2 1st year computer

24) Organizing code into packages helps with?

25 / 108

Tags: Chap 2 1st year computer

25) Function for random integer within range?

26 / 108

Tags: Chap 2 1st year computer

26) Correct way to import random?

27 / 108

Tags: Chap 2 1st year computer

27) Purpose of import statement?

28 / 108

Tags: Chap 2 1st year computer

28) Generate random number between 1 and 10 using random?

29 / 108

Tags: Chap 2 1st year computer

29) What is a Python library?

30 / 108

Tags: Chap 2 1st year computer

30) Correct function definition?

31 / 108

Tags: Chap 2 1st year computer

31) Benefit of default parameters?

32 / 108

Tags: Chap 2 1st year computer

32) Default parameters with non-default?

33 / 108

Tags: Chap 2 1st year computer

33) Output of:
def greet(name="Student"):
return "Hello " + name + "!"
print(greet("Ali"))

34 / 108

Tags: Chap 2 1st year computer

34) No argument passed to function with default parameters?

35 / 108

Tags: Chap 2 1st year computer

35) When a function is invoked?

36 / 108

Tags: Chap 2 1st year computer

36) What is a Python module?

37 / 108

Tags: Chap 2 1st year computer

37) How to call a function?

38 / 108

Tags: Chap 2 1st year computer

38) Purpose of functions?

39 / 108

Tags: Chap 2 1st year computer

39) Keyword to define a function?

40 / 108

Tags: Chap 2 1st year computer

40) Iterate over a string?

41 / 108

Tags: Chap 2 1st year computer

41) Data types a for loop can iterate over?

42 / 108

Tags: Chap 2 1st year computer

42) Correct for loop syntax?

43 / 108

Tags: Chap 2 1st year computer

43) Output of:
friends = ["John", "Mary", "Tom"]
for friend in friends:
print(friend)

44 / 108

Tags: Chap 2 1st year computer

44) Main use of for loop?

45 / 108

Tags: Chap 2 1st year computer

45) Correct while syntax?

46 / 108

Tags: Chap 2 1st year computer

46) If while condition is always true?

47 / 108

Tags: Chap 2 1st year computer

47) Correct about while loop?

48 / 108

Tags: Chap 2 1st year computer

48) Output of:
number = 3
while number < 6: print(number) number += 1

49 / 108

Tags: Chap 2 1st year computer

49) When condition in a while loop becomes false?

50 / 108

Tags: Chap 2 1st year computer

50) True about if-elif-else?

51 / 108

Tags: Chap 2 1st year computer

51) If all conditions in if-elif-else are false?

52 / 108

Tags: Chap 2 1st year computer

52) Correct about if-elif-else?

53 / 108

Tags: Chap 2 1st year computer

53) Output of:
temperature = 15
if temperature > 30: print("Hot day")
elif temperature > 20: print("Warm day")
else: print("Cool day")

54 / 108

Tags: Chap 2 1st year computer

54) What does elif do?

55 / 108

Tags: Chap 2 1st year computer

55) True about if-else?

56 / 108

Tags: Chap 2 1st year computer

56) If condition in if-else is false?

57 / 108

Tags: Chap 2 1st year computer

57) Output of:
temperature = 20
print("Hot day" if temperature > 30 else "Cool day")

58 / 108

Tags: Chap 2 1st year computer

58) Correct shorthand if-else syntax?

59 / 108

Tags: Chap 2 1st year computer

59) What does the else block do?

60 / 108

Tags: Chap 2 1st year computer

60) Example of an if statement?

61 / 108

Tags: Chap 2 1st year computer

61) If condition in if is false?

62 / 108

Tags: Chap 2 1st year computer

62) Correct syntax for if in Python?

63 / 108

Tags: Chap 2 1st year computer

63) When does the if block execute?

64 / 108

Tags: Chap 2 1st year computer

64) What does the if statement do?

65 / 108

Tags: Chap 2 1st year computer

65) A loop used to iterate over a collection such as lists:

66 / 108

Tags: Chap 2 1st year computer

66) Result of 10 - 4 + 2?

67 / 108

Tags: Chap 2 1st year computer

67) In 2 ** 3 * 4, which operation first?

68 / 108

Tags: Chap 2 1st year computer

68) Highest precedence in Python?

69 / 108

Tags: Chap 2 1st year computer

69) Result of 3 + 2 * 4?

70 / 108

Tags: Chap 2 1st year computer

70) In (3 + 2) ** 4, what is evaluated first?

71 / 108

Tags: Chap 2 1st year computer

71) If x = True and y = False, result of x or y?

72 / 108

Tags: Chap 2 1st year computer

72) Correct statement about logical and?

73 / 108

Tags: Chap 2 1st year computer

73) What does the not operator do?

74 / 108

Tags: Chap 2 1st year computer

74) Output of:
x = True
y = False
print(x and y)

75 / 108

Tags: Chap 2 1st year computer

75) Which logical operator returns True if at least one condition is True?

76 / 108

Tags: Chap 2 1st year computer

76) Which is NOT a valid compound assignment operator?

77 / 108

Tags: Chap 2 1st year computer

77) What does the -= operator do?

78 / 108

Tags: Chap 2 1st year computer

78) Output of:
a = 5
a **= 2
print(a)

79 / 108

Tags: Chap 2 1st year computer

79) Which assignment operator performs exponentiation?

80 / 108

Tags: Chap 2 1st year computer

80) Main purpose of the += operator?

81 / 108

Tags: Chap 2 1st year computer

81) Output of 10 >= 5?

82 / 108

Tags: Chap 2 1st year computer

82) Which of the following will return False when comparing 10 and 5?

83 / 108

Tags: Chap 2 1st year computer

83) What does the > operator do?

84 / 108

Tags: Chap 2 1st year computer

84) What will be the result of "S" <= "s" in Python?

85 / 108

Tags: Chap 2 1st year computer

85) Which comparison operator checks for inequality?

86 / 108

Tags: Chap 2 1st year computer

86) Which operator performs floor division?

87 / 108

Tags: Chap 2 1st year computer

87) What will be the output of 5 ** 2 in Python?

88 / 108

Tags: Chap 2 1st year computer

88) Which operator finds the remainder of a division?

89 / 108

Tags: Chap 2 1st year computer

89) What is the result of 15 // 4 in Python?

90 / 108

Tags: Chap 2 1st year computer

90) Which operator is used for exponentiation?

91 / 108

Tags: Chap 2 1st year computer

91) The operator used for exponentiation in Python is:

92 / 108

Tags: Chap 2 1st year computer

92) How do you display a message in Python?

93 / 108

Tags: Chap 2 1st year computer

93) Which function converts user input into an integer?

94 / 108

Tags: Chap 2 1st year computer

94) What does the input() function do in Python?

95 / 108

Tags: Chap 2 1st year computer

95) What is the correct way to define a variable in Python?

96 / 108

Tags: Chap 2 1st year computer

96) Which of the following is a correct way to output text in Python?

97 / 108

Tags: Chap 2 1st year computer

97) What happens if you don't add Python to PATH during installation?

98 / 108

Tags: Chap 2 1st year computer

98) What symbol is used to start a multi-line comment in Python?

99 / 108

Tags: Chap 2 1st year computer

99) How is a single-line comment written in Python?

100 / 108

Tags: Chap 2 1st year computer

100) What does the print() function do in Python?

101 / 108

Tags: Chap 2 1st year computer

101) Output of the following code:
age = 25
print("Age:", age)

102 / 108

Tags: Chap 2 1st year computer

102) A valid variable name in Python is:

103 / 108

Tags: Chap 2 1st year computer

103) What is an IDE in programming?

104 / 108

Tags: Chap 2 1st year computer

104) Where can you download Python officially?

105 / 108

Tags: Chap 2 1st year computer

105) What does compiling or interpreting a program do?

106 / 108

Tags: Chap 2 1st year computer

106) What is the first step in writing a computer program?

107 / 108

Tags: Chap 2 1st year computer

107) Python is best known for its:

108 / 108

Tags: Chap 2 1st year computer

108) An action needed during Python installation to run from the command line easily.

Your score is

The average score is 0%

0%

1. Online Earning Without Investment (The “Time for Money” Path)

The most reliable way to earn your first dollar online with zero upfront cost is to trade your time or an existing skill. No investment is required besides your effort and a laptop with an internet connection.

Here are the most beginner-friendly, legitimate options for 2026:

 
 
MethodHow It WorksBest ForRealistic First-Year Monthly Income
Freelancing ServicesOffer a specific skill (writing, design, video editing, virtual assistance) on platforms like Upwork or Fiverr.Those who have or want to build a marketable skill.$200 – $1,000+
Online Surveys & MicrotasksComplete small tasks like surveys, data entry, or watching ads on platforms like Swagbucks or Amazon Mechanical Turk (MTurk).Beginners with limited time or specialized skills.$20 – $150
Reselling (Retail Arbitrage)Buy discounted products from clearance racks (Walmart, Target) or thrift stores and resell them on eBay, Amazon, or Poshmark.People with a good eye for value and some free time for sourcing.$100 – $500
Affiliate MarketingPromote products or services using a unique link. You earn a commission for every sale made through your link.Those with a small social media following, blog, or YouTube channel.$0 – $500 (builds over time)

The Reality Check: Freelancing is the fastest path to real side income, often paying your first money within days or weeks. Surveys are the easiest to start but have the lowest ceiling. If you have a marketable skill, start with freelancing.


2. Best Freelancing Platforms for Students

As a student, you need platforms that are free to join, easy to navigate, and flexible around your class schedule. Here is the breakdown of the top options for 2026, tailored for beginners.

 
 
PlatformBest For StudentHow It WorksKey Pros for StudentsKey Cons for Students
FiverrAbsolute Beginners & CreativesYou create a “gig” (e.g., “I will design a logo”) and set your price. Buyers come to you.No bidding or proposals required. Great for design, writing, video, and voice-over gigs.Platform takes a 20% commission. Payment can take up to 14 days to withdraw.
UpworkBuilding a Long-Term CareerYou bid on job postings by sending proposals to clients. It’s more professional and corporate.Higher quality clients, robust payment protection, and long-term contract potential.The “Connects” system requires a small investment to bid, and the vetting process is more rigorous.
Freelancer.com“Learn by Doing” & Portfolio BuildingYou can participate in “Contests” where businesses post a design brief and you submit work for a chance to win.The contest feature is a goldmine for beginners. Even if you don’t win, you’ve created a portfolio piece for future clients.High competition from low-cost bidders can make it difficult to secure high rates early on.

Student-Verified Beginner Skills for 2026:

  • Micro Content Editing: Converting long videos into viral clips for TikTok/Reels.

  • AI Transcription & Formatting: Cleaning up AI-generated drafts for professional reports.

  • Canva Graphic Design: Creating social media graphics, YouTube thumbnails, and presentations.

  • Virtual Assistance: Calendar management, email triage, and data entry.


3. How to Earn Money Online in the USA (2026 High-Value Skills)

The US market in 2026 rewards specific, high-value digital skills that go beyond basic freelancing. If you want to earn “good money,” focus on these trends.

The “Upper-Middle Class” Side Hustles for 2026: 

 
 
High-Value SkillWhat You Actually DoEarning Potential (USD)Time to First Income
Freelance Software DevelopmentBuild websites, apps, or automation systems for companies. You don’t need a degree, just a portfolio.$50 – $150 per hour3-6 months (to build skills & portfolio)
AI Automation Agency (AAA)Build custom, automated workflows for small businesses using tools like Make.com or Zapier (e.g., automated customer service bots).$1,000 – $5,000+ per project2-4 months
High-Ticket ConsultingOffer specialized advice in an area you have deep knowledge in (e.g., marketing, finance, operations). You sell expertise, not time.$5,000 – $20,000+ monthly6-12 months (to establish credibility)
E-Commerce Store ManagementUse retail arbitrage (buying discounted products to resell) or wholesale sourcing on Amazon FBA or Shopify.$2,000 – $10,000+ monthly3-6 months

The Key Takeaway for the US Market: Stop trading time for dollars. The most successful earners in 2026 build systems that generate value autonomously. This means focusing on AI-human hybrid workflows (like AAA) or execution-based outcomes (like high-ticket consulting). 


4. Passive Income Ideas for Students

True “passive” income usually requires significant upfront work before it generates money while you sleep. Here are the most student-friendly options.

 
 
Passive Income IdeaHow It Works (The Upfront Work)Earning PotentialWhy It’s Great for Students
Digital ProductsCreate a Notion template for studying, a Lightroom preset for photos, a study guide PDF, or Canva templates. Sell them on Etsy or Gumroad.$50 – $800+ per monthYou create it once, and it sells indefinitely. Leverages your natural student experience.
Online Course CreationPackage your knowledge of a subject (e.g., “How to Ace the SAT Math Section”) into a structured video course. Sell it on Udemy or Teachable.$2,000 – $15,000+ monthly (once established)The upfront work is heavy (40-60 hours), but the income becomes mostly passive once it’s live.
Print-on-Demand (POD)Design graphics for t-shirts, hoodies, mugs, or phone cases. Use a service like Printful that prints and ships the product only when a customer orders it. You never handle inventory.$50 – $500+ per monthZero startup cost and no inventory risk. A single popular design can generate recurring sales for months.
YouTube ChannelCreate a channel in a niche you’re passionate about (gaming, study tips, tech reviews). Monetize through ads, affiliate links, and sponsorships.$50 – $500+ per month (from ads once monetized)Your content continues to earn ad revenue for years after it is published. It’s a long-term play but has the highest ceiling.

5. Crypto Basics for Beginners (2026 Edition)

Cryptocurrency in 2026 is very different from the “Wild West” days. It’s now more integrated, regulated, and accessible for beginners. Here is your safe starting guide.

Step 1: Understand the Core Idea
Cryptocurrency is digital money that operates on a decentralized network called a blockchain (a public, digital ledger of transactions). Think of it as a new type of asset class, similar to stocks or gold, but entirely digital.

Step 2: Start Safe & Small
You do not need to buy a whole Bitcoin. You can start with as little as $10–$50 on a regulated, user-friendly exchange.

Recommended Beginner Platforms for 2026: 

 
 
PlatformBest ForKey Features
CoinbaseAbsolute Beginners & User ExperienceExtremely easy to use, publicly traded company (NASDAQ), strong US regulatory compliance.
BitgetActive-Passive Income & AI ToolsAdvanced AI-Grid trading bots, “Copy Trading” (automatically mirror top traders), and a $300M+ Protection Fund.
KrakenSecurity & Long-Term HoldingExcellent security reputation, institutional-grade staking, and a long-standing US compliance record.

Step 3: Choose a Beginner Strategy (Do NOT Day Trade)

As a beginner, you should avoid trying to time the market. Instead, use one of these proven, lower-risk strategies:

  • Dollar-Cost Averaging (DCA): This is the ideal strategy for beginners. You invest a fixed amount of money at regular intervals (e.g., $20 every week), regardless of the price. This removes the emotional pressure of trying to find the “perfect” entry point and averages out your cost over time.

  • Staking (Real Yield): Instead of letting your crypto sit idle, you can “stake” it (lock it up to help secure the network) and earn passive income, similar to earning interest in a high-yield savings account. This is called earning “Real Yield” from protocol revenue.

  • HODL (Hold On for Dear Life): Simply buy a small amount of a major cryptocurrency like Bitcoin or Ethereum and plan to hold it for years, ignoring the short-term price swings.

Step 4: Master Security (This is Non-Negotiable)

  • Enable 2FA: Always use an authenticator app (like Google Authenticator), not SMS-based verification, for your exchange accounts.

  • Secure Your Keys: Your “seed phrase” (a set of 12-24 random words) is the master key to your crypto. Write it down on paper and store it somewhere safe offline. Never, ever store it digitally or share it with anyone. 

  • Use a Hardware Wallet: If you accumulate more than $500–$1,000 worth of crypto, invest in a hardware wallet (like Ledger or Trezor) to store your assets offline, safe from any online hack.


Your 3-Step Action Plan for This Week

The perfect moment to start is now. Do not wait for the perfect plan.

  1. Choose ONE Path: Pick the question that excites you the most. Is it freelancing (for quick cash), digital products (for long-term passive income), or crypto (for learning about a new asset class)? Do not try to do everything at once.

  2. Take ONE Small Action:

    • For Freelancing: Create a free account on Fiverr tonight. Set up your profile and create one simple “gig” for a skill you already have (e.g., “I will create a study schedule in Notion”).

    • For Passive Income: Brainstorm 3 digital product ideas you could create based on your student experience (e.g., a study guide, a budget template, a resume template).

    • For Crypto: Download the Coinbase app, complete the verification process (KYC), and buy your first $10 of Bitcoin.

  3. Be Consistent, Not Intense: Spend 30 minutes a day on your chosen path. Most people quit after two months when they’re earning $500 instead of $5,000. If you stick with it for 6-12 months, the math works. Consistency beats intensity every time.