0% found this document useful (0 votes)
34 views12 pages

Tasks Answers Made By: Safwan Yameen: City Names

The document contains 10 coding questions and answers. For each question there is a short description, the code, any inputs or function calls, and the outputs. The questions cover topics like city names, t-shirts, factorials, Fibonacci series, prime pairs, squares, strong numbers, pyramids, and leap frogs.

Uploaded by

Noman Ali
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
34 views12 pages

Tasks Answers Made By: Safwan Yameen: City Names

The document contains 10 coding questions and answers. For each question there is a short description, the code, any inputs or function calls, and the outputs. The questions cover topics like city names, t-shirts, factorials, Fibonacci series, prime pairs, squares, strong numbers, pyramids, and leap frogs.

Uploaded by

Noman Ali
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

Tasks answers

Made by: Safwan Yameen


City names:
Question:

Code:

function call:

Output:
T-shirt:
Question:

Code:

Function call:

Output:
Cities:
Question:

Code:

Function call:

Output:
Question 4 (factorial):
Question:

Code:

Input:

Output:
Question 5 (Fibonacci series):
Question:

Code:

Input:

Output:
Question 6 (pair prime):
Question:

Code:

Input:
20
Output:
(3, 5)
(5, 7)
(11, 13)
(17, 19)
Question 7 (square):
Question:

Code:

Input:

Output:
Question 8 (strong number):
Question:

Code:

Input:

Output:
Question 9 (pyramids):
Question:

Code:

Input:

Output:
Question 10 (leap frogs):
Question:
Code:

Input/Output:
A. N
AB. Y
ABB N
A.BB Y
A..BB..B N
A.B..BBB. Y
AB……… N
A.B..BBBB.BB Y

You might also like