[SOLVED] WT-Assignment 5

20.99 $

Programming resource
Digital learning resource
Category:
✓ Practical programming resource
✓ Suitable for guided study and reference
✓ Tutor guidance available when needed

Description

5/5 - (1 vote)

Q.1. Write a program to create a simple counting thread. It will count to 100, pausing one second between each number. Also, in keeping with counting theme, it will output a string every ten number.

 

Q.2. Write a program that uses multiple threads to find the integer in the range 1 to 10000 that has the largest number of divisors but for the range 1 to 100000 (or less, if you don’t have a fast computer).At the end of the program, output the elapsed.

Q.3. You’re working with an intern that keeps coming to you with JavaScript code that won’t run because the braces, brackets, and parentheses are off. To save you both some time, you decide to write a braces/brackets/parentheses validator. Write an efficient function that tells us whether or not an input string’s openers and closers are properly nested.

Examples:

“{ [ ] ( ) }” should return true

“{ [ ( ] ) }” should return false

“{ [ }” should return false

Q.4. Write a JavaScript program to generate the Christmas Tree pattern below. The tree should be composed of zeroes (0), and it must be topped with an asterisk (*).

 

Resource details

Understand the Task Before You Use the Resource

Review the requirements, identify the programming concepts involved, study the implementation and test your understanding with your own examples and modifications.