Date: Start Duration:

Name: End Duration:

Level: Internee

note: you can take help from google if you got stuck.

1. Find Number is Even or Odd using if else

2. Finding the biggest of three numbers ([10,7,8,6,11,17,20,1])

3. Generates the Sum of N Numbers ([10,7,8,6,11,17,20,1])

4. Get the Month Name From the Month Number

5. Write a program to convert the given string into an array.

Sample Input

$a = ‘Burch Jr, Philip H., The American establishment, Research in political economy 6(1983), 83-156’;

Sample Output

Array

( [0] => Burch Jr [1] => Philip H. [2] => The American establishment [3] => Research in political economy 6 (1983) [4] => 83-156 )

6. Write a Program to display a count, from 5 to 15 using loop as given below.

Rules & Hint

  • You can use “for” or “while” loop
  • You can use variable to initialize count
  • You can use html tag for line break

7. Write a program to calculate and display average temperature, five lowest and highest temperatures

Recorded temperatures : 78, 60, 62, 68, 71, 68, 73, 85, 66, 64, 76, 63, 75, 76, 73, 68, 62, 73, 72, 65, 74, 62, 62, 65, 64, 68, 73, 75, 79, 73

Expected Output :
Average Temperature is : 70.6 
List of five lowest temperatures : 60, 62, 63, 63, 64, 

List of five highest temperatures : 76, 78, 79, 81, 85,

8. Write a program to check two given integers, and return true if one of them is 30 or if their sum is 30.

Sample Input:
30, 0
25, 5
20, 30
20, 25
Sample Output:
bool(true)
bool(true)
bool(true)

bool(false)

write a program to print the following pattern.

print-diamond-pattern.png

Write a program to print numbers from 10 to 1 using the recursion function

Output

Number is 10

Number is 9

Number is 8

Number is 7

Number is 6

Number is 5

Number is 4

Number is 3

Number is 2 

Number is 1.

Leave a Reply

Your email address will not be published. Required fields are marked *