O LEVEL (O-PR) – BATCH: S1
Do the following settings:
a) Display pointer trails
b) Change the normal pointer of a mouse to another pointer
c) Set the date advanced by 2 months
d) Reset the system date and time
e) Set the system time late by 2 hrs: 40 minutes.
1. Computer, open your Settings, navigate to Devices > Mouse, then click "Additional mouse options" - within the Mouse Properties window, go to the "Pointer Options" tab and check the box next to "Display pointer trails" to activate the feature; you can adjust the trail length using the slider provided.
2. To change your mouse pointer to a different one, you can use the Mouse Properties window or the Ease of Access Center.
Using the Mouse Properties window
Open Mouse Properties
Click the Pointers tab
Under Customize, select the pointer you want to change
Click Browse
Select the new pointer you want to use
Click Open
Click Apply and then OK.
3. To advance the date on your computer by two months, go to your system settings, navigate to the "Date and Time" section, then manually change the month to two months ahead while keeping the day and year the same; make sure to turn off any automatic time synchronization before making the change
4. To set time and time zone in Windows, right-click on the Start menu and then select Settings > Time & language > Date & time.
5. To set time and time zone in Windows, right-click on the Start menu and then select Settings > Time & language > Date & time. And change the time manually.
2. Write code for displaying an alert dialog box with OK button, welcoming a user with a message “Welcome To my Web Site”. As soon as the OK button is clicked, an image should be displayed in the web browser. (Html web designing).
A:
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<script type="text/javascript">
alert("WELCOME TO MY SITE!");
document.write('<img src="logo1.png"/>');
</script>
</body>
</html>
3. Using ‘java script’, write a program to remove all occurrences of word “the” and “The” from an input
string. For example:
Input: The Dhillon Theatre is now the Fun Republic.
Output: Dhillon atre is now Fun Republic.
Answer
<!DOCTYPE html>
<html>
<body>
<input id="text" type="text" value="The Dhillon Theatre is now the Fun Republic." />
<button onclick="removeThe()">Remove 'the'</button>
<p id="result"></p>
<script>
function removeThe() {
const input = document.getElementById("text").value;
const output = input.replace(/the/gi, '').replace(/\s+/g, ' ').trim();
document.getElementById("result").innerText = output;
}
</script>
</body>
</html>
Result:-
Dhillon atre is now Fun Republic.
5. create a function to print all prime numbers between 20 and 100. In python
def print_primes():
for num in range(20, 101):
if all(num % i != 0 for i in range(2, int(num ** 0.5) + 1)):
print(num)
# Call the function
print_primes()
Result:-
23
29
31
37
41
43
47
53
59
61
67
71
73
79
83
89
97