Skip to main content

Assignments for XI Sc - IT


1. Simple Controls
A. Write a program to take the price of raw materials A & B from the user and hence compute the cost price. Show the same to the user in a box and then calculate the selling price with 20% profit added to the cost price. Show the same in a separate box. Use four text boxes and name them properly

B. Now add a button to the earlier program so that you can run the calculations when the button is clicked and not at Form_Load or Form_Click. If you dont know about buttons ... look below

C. Now add a check box (called AddProfit) to the earlier code / form. Hence change your code so that, it will add the profit to the cost price, only it the AddProfit box is checked (i.e. there is a tick mark in it) else, it should simply show the cost price as selling price

About Buttons:
Use the toolbox you see on the left, OR open the same from the spanner & hammer icon on the top. Click on the plain rectangle below the "A" icon and to its right. Then drag and drop on the form to make the button. In the code window create a code for the button (which by default is called button1) and for the event Click, .... i.e.
Private Sub Button1_Click()
End Sub

About Check Boxes:
The toolbox has a symbol of a box with a tick mark. Click on it and then drag and drop on the form to create the control (i.e. checkbox). If while the code is running, the box is clicked upon and it is blank, it takes the value as true and shows a tick mark. If the box already has a tick while the program is running, it will become blank and its value becomes false. You can use the value as follows in your code:
IF AddProfit = True THEN .......

2. Diagnosing Loops and Branches
How will the following program work. Go over each line step-by-step like the debug feature of VB and fill up the table below with the values of the variables as the loop goes over different iterations
For i = 1 to 7
   k = 1
   For j = i To i +1
      k = k + j
   Next j
Next i

|  i  |  j  |  k  |
~~~~~~~~
|  1 |  0 |  1  |
|  1 |  1 |  2  |
etc....

Comments

All Time Popular Posts

Annual Day 2023

 After a long hiatus due to covid we finally got most activities on track. The Annual Day function is always a big deal for everyone at Abhinav. It has been a tradition my mother started that the Annual Day will be not a Teacher-managed event, but a Student Initiative. Since when I was a teenager, I was part of this and today 10 years after she passed, I still strive to make it work as she would have. After some hesitation, we began working in early January. I wanted to use an outside choreographer just so that teachers will not be burdened. (They are already struggling with post-covid learning difficulties) But then, an outside guy could never do justice to the Abhinav style of doing things. We always keep in mind that the cultural program should be enjoyable to everyone in the audience and at the same time should display as many of the diverse talents that our students have, as possible.  It was a great relief that my G3 students came to the rescue. Almost all of std 9 and m...

Trapping events - IT assignment for Std XI

Perform these tasks on your PC and give yor answers as comments to this post or as an email to my ID - director@abhinav.ac.in . What is the sequence for the events given below and when do they occur for the given object? a) Textbox - Change, KeyPress, KeyDown, Validate b) Command button - Click, GotFocus, LostFocus, KeyPress c) Combo Box - Change, Click, DblClick, DropDown, Scroll Draw an equilateral triangle (should actually look like it) whose one vertex is the point at which the user clicks on the form. Make a simple calculator which has buttons for different numbers & operations (+, -, *, /, ^) and a box to display the result of each operation as well as each number being typed.

Are Self-Driving Cars Taking Over Humans?

- Arya Dharmadhikari(Std X, Abhinav Vidyalay) The 21st century has played an important role in the advancement of technologies. This development has even revolutionized the Automobile industry. We have developed from fuel-efficient vehicles to Hybrids and EVs and now we are enhancing self-driving vehicles. Tesla, Waymo, Volvo, GM, BMW, Mercedes are among the few companies that have started testing self-driving cars. The leading among them is Waymo, which has developed level 4 autonomy which we will discuss in the next section. So before reaching levels of autonomy we should understand what self-driving cars are and why we require them. What is a self-driving car? A self-driving car (also called an autonomous vehicle) is a car that is competent in driving itself without any human intervention. The car has sensors, cameras, lasers, radars, GPS, LIDAR through which the Artificial Intelligence senses the surrounding environment, this helps the car to navigate on its path and to detect sig...