ASSIGNMENT 3
Name:
Sajal Shahzadi
Roll Number:
S3F23UBSCS044
Subject:
Programming Fundamentals
Submitted to:
Sir Tanveer Ahmed
Assign Date:
Saturday,15th June 2024
Due Date:
Tuesday, 25th June 2024
ASSIGNMENT 3
Name:
Nashrah Ansar
Roll Number:
S3F23UBSCS001
Subject:
Programming Fundamentals
Submitted to:
Sir Tanveer Ahmed
Assign Date:
Saturday,15th June 2024
Due Date:
Tuesday, 25th June 2024
ASSIGNMENT 3
Name:
Muneeba Aftab
Roll Number:
S3F23UBSCS039
Subject:
Programming Fundamentals
Submitted to:
Sir Tanveer Ahmed
Assign Date:
Saturday,15th June 2024
Due Date:
Tuesday, 25th June 2024
ASSIGNMENT 3
Name:
Aneeza
Roll Number:
S3F23UBSCS019
Subject:
Programming Fundamentals
Submitted to:
Sir Tanveer Ahmed
Assign Date:
Saturday,15th June 2024
Due Date:
Tuesday, 25th June 2024
Program: 1
Write a program with two-dimension array to multiply
two matrices and store these values in 3rd array. Also
display 3rd array value and also multiplications table for
each value in 3rd array. Display values of 2nd array as
columns and display 1st array values as rows.
Program 2:
You are required to code for the children word guessing game. Save 50 words in a
text file, get all words from text file and create an array of 50 elements that holds
the words from the file, display random words from the array list, when
displayed, word should not be complete. Remove any alphabet except first and
last element. And ask the user to guess the alphabet, give the user maximum
three tries, if user guess the alphabet, then next word should be displayed in the
same pattern as discussed above. If user does not guess the number in 3tries, he
couldn't guess the word, display message "You should improve your English” and
ask him if he wants to play again, if yes repeat the process and if not quit the
game by displaying message "You are looser'.
Program 3:
In the SCRABBLE Crossword Game, players from words using small tiles, each
containing a letter and a face values. The face value varies from one letter to
another, based on the letter's rarity. (Here are the face values: 1: AEILNORSTU, 2:
DG, 3: BCMP, 4: FHVWY, 5: K, 8: JX, 10: QZ). Store al SCRABBLE values in a text file
with alphabet name and its value then get those values from text file and store
these values in array. The array will have 26 elements, corresponding to the 26
letters of the alphabets. For example, element 0 of the array will store 1(because
the SCRABBLE value of the letter A is 1), element 1of the array will store 3
(because the SCRABBLE value of the letter B is 3), and so forth. As each character
of the input word is read, the program will use the array to determine the
SCRABBLE value of that character. Also display table of each alphabet. You are
required to work with two-dimensional array for the table.