Geschreven door studenten die geslaagd zijn Direct beschikbaar na je betaling Online lezen of als PDF Verkeerd document? Gratis ruilen 4,6 TrustPilot
logo-home
College aantekeningen

FBISE , National Curriculum of Pakistan

Beoordeling
-
Verkocht
-
Pagina's
3
Geüpload op
21-10-2024
Geschreven in
2024/2025

Notes of Chapter 2 & 3

Instelling
Vak

Voorbeeld van de inhoud

Ms. Amna Altaf APS & C (Girls)


Chapter # 2:
Computational thinking & Algorithms
Give long answers to the following extended response questions. (ERQs).
Q1. Identify whether the given problems are decision problem, counting problem or search
problem. Write your answer in front of each problem.
a. Does a given binary string have an even number of zeros? Counting+ Decision
b. Flipping a coin results ion head or tail. I flip a coin 20 times, how many different sequences of
heads and tails are possible? Counting Problem
c. Does a certain Java program say “yes” to an empty input? Decision Problem
d. How many ways can the letters of the word “TRIANGLE” be arranged? Counting Problem
e. N-Queens problem: Where the goal is to place eight queens on a chess board such that no
queens attacks any other. Counting Problem

Q2. A student can take one course of physics one of science and one of mathematics. He/She
may choose one of three physics courses (p1, p2, p3) one of 2 science courses (s1,s2) and
one of 2 mathematics courses (m1,m2). In how many ways can this student select the three
courses he has to take?

Ans:To determine how many ways the student can select one course from each of the three subjects,
you can use the principle of multiplication (also known as the counting principle).

Here's how it works for this problem:

• The student has 3 choices for the Physics course (P1, P2, P3).
• The student has 2 choices for the Science course (S1, S2).
• The student has 2 choices for the Mathematics course (M1, M2).

To find the total number of ways the student can select one course from each subject, you multiply
the number of choices for each subject:

Total number of ways=(Number of Physics choices)×(Number of Science choices)×(Number of Mathe
matics choices)

Substitute the numbers:

Total number of ways=3×2×2

Calculate:

Total number of ways=12

So, the student can select the three courses in 12 different ways.

Q2. Create an IPO chart which will accept the ages of four boys and their total age and
average age. The program must display both the total age & average age.

Geschreven voor

Instelling
Middelbare school
Vak
School jaar
3

Documentinformatie

Geüpload op
21 oktober 2024
Aantal pagina's
3
Geschreven in
2024/2025
Type
College aantekeningen
Docent(en)
Amna altaf
Bevat
Alle colleges

Onderwerpen

$8.49
Krijg toegang tot het volledige document:

Verkeerd document? Gratis ruilen Binnen 14 dagen na aankoop en voor het downloaden kun je een ander document kiezen. Je kunt het bedrag gewoon opnieuw besteden.
Geschreven door studenten die geslaagd zijn
Direct beschikbaar na je betaling
Online lezen of als PDF

Maak kennis met de verkoper
Seller avatar
amnaaltaf

Maak kennis met de verkoper

Seller avatar
amnaaltaf Army Public School
Volgen Je moet ingelogd zijn om studenten of vakken te kunnen volgen
Verkocht
-
Lid sinds
1 jaar
Aantal volgers
0
Documenten
7
Laatst verkocht
-

0.0

0 beoordelingen

5
0
4
0
3
0
2
0
1
0

Recent door jou bekeken

Waarom studenten kiezen voor Stuvia

Gemaakt door medestudenten, geverifieerd door reviews

Kwaliteit die je kunt vertrouwen: geschreven door studenten die slaagden en beoordeeld door anderen die dit document gebruikten.

Niet tevreden? Kies een ander document

Geen zorgen! Je kunt voor hetzelfde geld direct een ander document kiezen dat beter past bij wat je zoekt.

Betaal zoals je wilt, start meteen met leren

Geen abonnement, geen verplichtingen. Betaal zoals je gewend bent via iDeal of creditcard en download je PDF-document meteen.

Student with book image

“Gekocht, gedownload en geslaagd. Zo makkelijk kan het dus zijn.”

Alisha Student

Bezig met je bronvermelding?

Maak nauwkeurige citaten in APA, MLA en Harvard met onze gratis bronnengenerator.

Bezig met je bronvermelding?

Veelgestelde vragen