0% found this document useful (0 votes)
16 views6 pages

Model Question

The document contains a series of programming tasks, including creating JavaScript functions for grading, HTML forms for job applications and grocery lists, CSS designs for animations, and React applications for greeting users and changing background colors. Each task includes code snippets and specific requirements for implementation. Additionally, there are mathematical problems and logic questions presented in a quiz format.

Uploaded by

ranganathanb893
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)
16 views6 pages

Model Question

The document contains a series of programming tasks, including creating JavaScript functions for grading, HTML forms for job applications and grocery lists, CSS designs for animations, and React applications for greeting users and changing background colors. Each task includes code snippets and specific requirements for implementation. Additionally, there are mathematical problems and logic questions presented in a quiz format.

Uploaded by

ranganathanb893
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/ 6

Part A(10*5=50)

1 Write a Javascript program for the following table


Marks Grade Points Letter
Range Grade
91-100 10 O
81-90 9 A+
71-80 8 A
61-70 7 B+
60-56 6 B
55-50 5 C
<50 0 RA <!DOCTYPE html>
ANSWER: <html>
function getGrade(marks) { <head>
let gradePoint, letterGrade; <title>Application Form</title>
</head>
if (marks >= 91 && marks <= 100) { <body>
gradePoint = 10; <h2>Application Form</h2>
letterGrade = "O"; <form>
} else if (marks >= 81 && marks <= 90) { <label for="fname">First Name:</label>
gradePoint = 9; <input type="text" id="fname" name="fname">
letterGrade = "A+"; <label for="lname">Last Name:</label>
} else if (marks >= 71 && marks <= 80) { <input type="text" id="lname" name="lname"><br><br>
gradePoint = 8;
letterGrade = "A"; <label for="dob">Date of birth:</label>
} else if (marks >= 61 && marks <= 70) { <input type="date" id="dob" name="dob">
gradePoint = 7; <label for="age">Age:</label>
letterGrade = "B+"; <input type="number" id="age" name="age" min="0"><br><br>
} else if (marks >= 56 && marks <= 60) {
gradePoint = 6; <label for="gender">Gender:</label>
letterGrade = "B"; <select id="gender" name="gender">
} else if (marks >= 50 && marks <= 55) { <option value="male">Male</option>
gradePoint = 5; <option value="female">Female</option>
letterGrade = "C"; <option value="other">Other</option>
} else if (marks < 50) { </select>
gradePoint = 0;
letterGrade = "RA"; <label for="email">Email Address:</label>
} else { <input type="email" id="email" name="email"><br><br>
console.log("Invalid marks. Please enter a valid value between 0 and 100.");
return; <label>Positions Available:</label>
} <input type="radio" name="position" value="junior"> Junior Developer
<input type="radio" name="position" value="mid"> Mid-level Developer
console.log(`Marks: ${marks}`); <input type="radio" name="position" value="senior"> Senior Developer<br><br>
console.log(`Grade Points: ${gradePoint}`);
console.log(`Letter Grade: ${letterGrade}`); <label>Programming Languages:</label>
} <input type="checkbox" name="language" value="java"> Java
<input type="checkbox" name="language" value="javascript"> JavaScript
// Taking marks input from the user <input type="checkbox" name="language" value="python"> Python<br><br>
let marks = parseInt(prompt("Enter marks:"));
getGrade(marks); <label for="password">Password:</label>
<input type="password" id="password" name="password">
2 Create Application Form like this <label for="confirm_password">Confirm Password:</label>
<input type="password" id="confirm_password" name="confirm_password"><br><br>

<input type="submit" value="Submit">


<input type="reset" value="Reset">
</form> <input type="checkbox" name="skills" value="python"> Python
</body>
<input type="checkbox" name="skills" value="csharp"> C#<br><br>
</html>
3. Create an HTML form for a Job Application that collects the applicant's name, email, phone number,
gender, job position, and skills, with a submit button. <input type="submit" value="Submit Application">
<!DOCTYPE html> </form>
<html> </body>
<head> </html>
<title>Job Application Form</title> 4. Create an HTML form that collects a grocery list, allowing users to add multiple items with
</head>
checkboxes, and includes a submit button.
<!DOCTYPE html>
<body> <html>
<h2>Job Application Form</h2>
<head>
<title>Grocery List Form</title>
<form action="#" method="post"> </head>
<label for="name">Full Name:</label>
<body>
<h2>Grocery List</h2>
<input type="text" id="name" name="name" required><br><br> <form action="#" method="post">
<p>Select the items you want to buy:</p>

<label for="email">Email Address:</label> <input type="checkbox" name="grocery" value="milk"> Milk<br>


<input type="checkbox" name="grocery" value="bread"> Bread<br>
<input type="email" id="email" name="email" required><br><br>
<input type="checkbox" name="grocery" value="eggs"> Eggs<br>
<input type="checkbox" name="grocery" value="cheese"> Cheese<br>
<label for="phone">Phone Number:</label>
<input type="checkbox" name="grocery" value="fruits"> Fruits<br>
<input type="checkbox" name="grocery" value="vegetables"> Vegetables<br>
<input type="tel" id="phone" name="phone" required><br><br> <input type="checkbox" name="grocery" value="rice"> Rice<br>
<input type="checkbox" name="grocery" value="pasta"> Pasta<br><br>

<label>Gender:</label> <input type="submit" value="Submit List">


</form>
<input type="radio" name="gender" value="male" required> Male
</body>
<input type="radio" name="gender" value="female" required> Female </html>
<input type="radio" name="gender" value="other" required> Other<br><br> 5. Create a CSS design to move the text from top left corner to bottom right corner.
<!DOCTYPE html>
<html>
<label for="position">Job Position:</label> <head>
<title>Move Text Animation</title>
<select id="position" name="position" required> <style>
<option value="">--Select Position--</option> body {
height: 100vh;
<option value="junior">Junior Developer</option> margin: 0;
<option value="mid">Mid-level Developer</option> overflow: hidden;
position: relative;
<option value="senior">Senior Developer</option> }
</select><br><br>
.moving-text {
position: absolute;
<label>Skills:</label> top: 0;
left: 0;
<input type="checkbox" name="skills" value="java"> Java font-size: 24px;
<input type="checkbox" name="skills" value="javascript"> JavaScript font-weight: bold;
animation: moveText 5s linear forwards;
} </head>
<body>
@keyframes moveText {
from { <h2>Enter Your Personal Details</h2>
top: 0; <form id="personalForm">
left: 0; <label>Full Name:</label><br>
} <input type="text" id="name"><br><br>
to {
top: 90%; <label>Email:</label><br>
left <input type="email" id="email"><br><br>
6. Create a CSS design to rotate a image in a clock wise direction
<!DOCTYPE html> <label>Phone Number:</label><br>
<html> <input type="tel" id="phone"><br><br>
<head>
<title>Rotating Image</title> <label>Address:</label><br>
<style> <input type="text" id="address"><br><br>
.rotate-image {
width: 200px; <input type="button" value="Submit" onclick="validateForm()">
height: auto; </form>
animation: rotateClockwise 5s linear infinite;
} <div class="result" id="resultBox">
<h3>Submitted Details:</h3>
@keyframes rotateClockwise { <p><strong>Name:</strong> <span id="resName"></span></p>
from { <p
transform: rotate(0deg); 8. Create a Simple Calculator and implement
} including addition, subtraction, multiplication, and division using React.
to { import React, { useState } from "react";
transform: rotate(360deg);
} export default function Calculator() {
} const [input1, setInput1] = useState("");
</style> const [input2, setInput2] = useState("");
</head> const [result, setResult] = useState(null);
<body>
<h2>Rotating Image Example</h2> const handleCalculation = (operator) => {
<img src="your-image.jpg" alt="Rotating" class="rotate-image"> const num1 = parseFloat(input1);
</body> const num2 = parseFloat(input2);
</html>
7. Design a validation form with your personal details and display it after submitting the button. If you if (isNaN(num1) || isNaN(num2)) {
were missed to enter any detail in the text box, popup a alert box. alert("Please enter valid numbers!");
<!DOCTYPE html> return;
<html> }
<head>
<title>Personal Details Form</title> let res;
<style> switch (operator) {
body { case "+":
font-family: Arial, sans-serif; res = num1 + num2;
padding: 20px; break;
} case "-":
.result { res = num1 - num2;
margin-top: 20px; break;
padding: 10px; case "*":
border: 1px solid #ccc; res = num1 * num2;
display: none; break;
} case "/":
</style> if (num2 === 0) {
alert("Division by zero is not <div style={{ textAlign: "center", paddingTop: "50px" }}>
9. Create a React application that does the following: <h2>Change Background Color</h2>
1. Displays a text input where a user can type their name. <div style={{ display: "flex", justifyContent: "center", gap: "10px" }}>
2. Shows a button labeled "Greet Me". <button onClick={() => setBgColor("blue")}>Blue</button>
3. When the button is clicked, it displays a greeting message like "Hello, [name]!" below the <button onClick={() => setBgColor("red")}>Red</button>
input field. <button onClick={() => setBgColor("green")}>Green</button>
<button onClick={() => setBgColor("yellow")}>Yellow</button>
import React, { useState } from "react"; <button onClick={() => setBgColor("white")}>Reset</button>
</div>
function App() { </div>
const [name, setName] = useState(""); );
const [greeting, setGreeting] = useState(""); }

const handleGreet = () => { export default App;


if (name.trim() === "") { Part-B(50 MARKS)
alert("Please enter your name."); 1 Today it is Thursday. After 132 days, it will be
return; a) Monday b) Sunday c) Wednesday d) Thursday
}
setGreeting(`Hello, ${name}!`); 2 Find the H.C.F, if the numbers are in the ratio of 4 : 5 : 6 and their L.C.M. is 2400.
}; a)35 b)20
c)40 d)67
return (
<div style={{ textAlign: "center", marginTop: "50px" }}> 3 What is the value of c , If 8 is 4% of a, and 4 is 8% of b. c equals b/a.
<h2>Greeting App</h2> a)12 b)1/4 c)0.155 d) None of these
<input
type="text" 4 What is the average of first five multiples of 12?
placeholder="Enter your name" a)36 b)38
value={name} c)40 d)42
onChange={(e) => setName(e.target.value)}
style={{ padding: "8px", width: "200px" }} 5 What is the difference in the place value of 5 in the numeral 754853?
/> a)49500 b)49950 c)45000 d)49940
<br /><br />
<button onClick={handleGreet} style={{ padding: "8px 16px" }}> 6 If January 1, 1996, was
Greet Me Monday, what day of
</button> the week was January 1,
<br /><br /> 1997?
{greeting && <h3>{greeting}</h3>} Wednesday
</div> 7 40 % of 280 =?
); a)112 b)116
} c)115 d)120

export default App; 8 The sum of ages of 5 children born at the intervals of 3 years each is 50 years. What is the age of the
10 Create a React application that change the color of the window when clicking the corresponding color youngest child?
button. a)4 years b)8 years
c)10 years d) None of these
import React, { useState, useEffect } from "react";
9 Find the greatest number that will divide 43, 91 and 183 so as to leave the same remainder in each
function App() { case.
const [bgColor, setBgColor] = useState("white"); a)4 b)7
c)9 d)13
useEffect(() => {
document.body.style.backgroundColor = bgColor; 10 The cube root of .000216 is:
}, [bgColor]); a)0.6 b)0.06
c)77 d)87
return (
11 Tea worth Rs. 126 per kg and Rs. 135 per kg are mixed with a third variety in the ratio 1 : 1 : 2. If the time simple &N4 %N5
mixture is worth Rs. 153 per kg, the price of the third variety per kg will be: solution plant @D5 %T5
a)Rs. 169.50 b)Rs. 170 point good %D4 @N4
c)Rs. 175.50 d)Rs. 180 sister phone #R6 %N6
23
12 It was Sunday on Jan 1, 2006. What was the day of the week Jan 1, 2010? a)#E8 b)@E9 c)@E8 d)#T9
a)Sunday b)Saturday c)Friday d)Wednesday
a)Monday b)Tuesday c)Wednesday d)Thursday 24
13 Which one of the following is not a prime number? a)%N5#E6 b)@E4 c)&N4 d)%N5
a)31 b)61
c)71 d)91 25
a)sick b)turn c)point d)good
14 What decimal of an hour is a second ?
a)0.0025 b)0.0256 c)0.00027 d)0.000126 26 A father distributed some chocolates among his four children and kept some with him. The eldest
three children got chocolates in the ratio 3 : 11 : 7. The total number of chocolates with father and
15 Look at this series: 7, 10, 8, 11, 9, 12, ... What number should come next? youngest child is three times the total chocolates with the three eldest children. The ratio of
a)7 b)10 chocolates with father and that with all the children is 3 : 4. Find the total number of chocolates if the
c)12 d)13 youngest child has 81 chocolates with him?
A. 273 B. 252 C. 276
16 SCD, TEF, UGH, ____, WKL D.303 E. None of these
a)CMN b)UJI
c)VIJ d)IJT 27 Sumit hired a travelling car for a tour. If the car is rented for 8 hours or less the charge is Rs. 100 per
hour or Rs. 8 per km whichever is more. On the other hand, if the car is rented for more than 8 hours,
17 B2CD, _____, BCD4, B5CD, BC6D the charge is Rs. 80 per hour or Rs. 6 per km whichever is more. Sumit used the car for 120 km and
a)B2C2D b)BC3D c)B2C3D d)BCD7 paid Rs. 800. For how many hours did he took the car for rent?
A. 12 hours B. 9 hours C. 10 hours
18 Pointing to a photograph of a boy Mr.Ram D.8hours E. 11 hours
Mr Ram related to that boy? 28 In class X of a school there are two sections A and B with strength ratio 2 : 1. The ratio of boys and
a) Brother b) Uncle girls in section A is 3 : 1 and that in section B is 3 : 5. Students of both the sections are made to stand
c) Cousin d) Father in the ground in rows of boys and girls, with each row having equal number of students. If the
maximum number of students possible in a row is 96 what is the difference between the number of
19 There are 24 students in dance class, and the teacher is planning for an arrangement of students on boys in section A and B?
stage. Sampratha is 9th from the left side of the row and Supreetha is 22nd from the right side of the A. 218 B.286 C. 372
row. Find the number of dancers standing between the sisters Sampratha and Supreetha? D. 288 E. None of these
a)4 b)5 29 The ratio of marks obtained by Shubham in theory to the total marks which can be obtained in theory
c)6 d)7 is 7 : 10. Total marks which can be obtained in practicals were 20% of the total marks of theory. If
Shubham got full marks in practical then find the ratio of total marks obtained by Shubham to the
20 There are 24 students in dance class, and the teacher is planning for an arrangement of students on total marks which can be obtained in the subject (theory + practical)
stage. Sampratha is 9th from the left side of the row and Supreetha is 22nd from the right side of the A. 4 : 5 B. 3 : 5 C. 5 : 6
row. Find the number of dancers standing between the sisters Sampratha and Supreetha? D. 3 : 4 E. 2 : 3
a)4 b)5 30 The ratio of salary of A and B is 5 : 7 and that of B and C is 3 : 5. The salary of A is Rs. 165000 and
c)6 d)7 C spends 28.56% of his salary on rent. How much money is left with C after expenditure on rent?
A. Rs. 296000 B. Rs. 268000 C. Rs. 282000
21 Complete the series 1,6,13,22,33,.. D. Rs. 275000 E. None of these
a)46 b)48 31-32.State which of the following CONCLUSIONS are true for the given statements. Draw the
c)49 d)51 logical Venn Diagram
31 Statements:
22 In a row of persons, the position of Saket from the left side of the row is 27th and position of Saket All the windows are doors.
from the right side of the row is 34th. Find the total number of students in the row? No door is a wall.
a)60 b)61 Conclusions:
c)62 d)59 1. Some windows are walls.
2. No wall is a door.
Question No: (23-25)
Analyse the given information and answer the following questions: 32 STATEMENTS:
In a certain code language (i) Some papers are pens
(ii) All pens are scales
(iii) No scale is marker 43 Question: How many children does M have?
Statements:
CONCLUSIONS: 1.H is the only daughter of X who is wife of M.
(i) Some marker being paper is a possibility 2.K and J are brothers of M.
(ii) All marker being paper is a possibility A. (a) B. (b) C. (c) D. (d) E. (e)

33 STATEMENTS: 44 Question: How much was the total sale of the company?
(i) Some trees are papers Statements:
(ii) Some papers are pens 1.The company sold 8000 units of product A each costing Rs. 25.
(iii) All pens are cars 2.This company has no other product line.
(iv) All cars are trucks A. (a) B. (b) C. (c) D. (d) E. (e)
(v) No truck is cycle
45 Question: The last Sunday of March, 2006 fell on which date?
CONCLUSIONS: Statements:
(i) No cycle is tree 1.The first Sunday of that month fell on 5th.
(ii) No cycle is paper 2.The last day of that month was Friday.
(iii) No cycle is car A. (a) B. (b) C. (c) D. (d) E. (e)
(iv) No cycle is pen
46 What was the day of the week on 28th May, 2006?
34 Find the value of N+I+N+E====7 + 6 + 7 + 5==25 a)Thursday b)Friday c)Saturday d)Sunday
FINE + NINE= WIVES
35 Find the value of M+O+N+E+Y 47 What was the day of the week on 17th June, 1998?
SEND + MORE = MONEY======14 a)Monday b)Tuesday c)Wednesday d)Thursday
48 If today is Thursday , after 730 days which will be the day of the week ?
36 The last day of a century cannot be : a)Thursday b)Friday c)Saturday d)Monday
a) Monday b) Wednesday c) Friday d) Saturday
37 What will be the day of the week on 1st January, 2010? 49 What is the angle between the two hands of a clock when the time shown by the clock is 5.30 p.m. ?
a) Friday b) Saturday c) Sunday d) Monday a) 00 b) 500 c)300 d)150
38 Today is Monday. After 61 days, it will be:
a) Wednesday b) Saturday c) Tuesday d) Thursday 50 How many times do the hands of a clock coincide in a day?
39 How many times in a day, the hands of a clock are straight?
a)12 b)22 c)24 d)44 a)12 b)22 c)24 d)44
40 What is the angle between the two hands of a clock when the time shown by the clock is 5.30 p.m.?
a) 00 b) 500 c)300 d)150
Directions (41-45): Read both the statements and Give answer
(a) If the data in statement I alone are sufficient to answer the question, while the data in statement II
alone are not sufficient to answer the question
(b) If the data in statement II alone are sufficient to answer the question, while the data in statement I
alone are not sufficient to answer the question
(c) If the data either in statement I alone or in statement II alone are sufficient to answer the question
(d) If the data given in both statements I and II together are not sufficient to answer the question and
(e) If the data in both statements I and II together are necessary to answer the question.

41 Question: In which year was Rahul born?


Statements:
1.Rahul at present is 25 years younger to his mother.
2.Rahul's brother, who was born in 1964, is 35 years younger to his mother.
A. (a) B. (b) C. (c) D. (d) E. (e)

42 Question: What will be the total weight of 10 poles, each of the same weight?
Statements:
1.One-fourth of the weight of each pole is 5 kg.
2.The total weight of three poles is 20 kilograms more than the total weight of two poles.
A. (a) B. (b) C. (c) D. (d) E. (e)

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy