Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Class notes

Notes of Extensive response Questions

Rating
-
Sold
-
Pages
3
Uploaded on
28-10-2024
Written in
2024/2025

Extensive response Questions are described in easy and to the point easy to learn

Institution
Freshman / 9th Grade
Course
Computer Science

Content preview

Ms. Amna Altaf Unit 2: Computational Thinking & Algorithms Computer Sc.

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 Mathematics 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.

Written for

Institution
Freshman / 9th grade
Course
Computer Science
School year
1

Document information

Uploaded on
October 28, 2024
Number of pages
3
Written in
2024/2025
Type
Class notes
Professor(s)
Amna altaf
Contains
Ix

Subjects

$8.49
Get access to the full document:

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

Get to know the seller
Seller avatar
amnaaltaf

Get to know the seller

Seller avatar
amnaaltaf Army Public School
Follow You need to be logged in order to follow users or courses
Sold
-
Member since
1 year
Number of followers
0
Documents
7
Last sold
-

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

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

Working on your references?

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

Working on your references?

Frequently asked questions