education.mu
Welcome, Guest. Please login or register.
May 20, 2012, 02:49:53 PM

Login with username, password and session length
Search:     Advanced search
Welcome to the free discussion forum. Ask your questions and we shall answer you immediately. Everyday new notes are added on the forum.
988 Posts in 592 Topics by 4706 Members
Latest Member: Sameerchand2012
* Home Help Search Calendar Login Register
+  education.mu
|-+  Tertiary Education
| |-+  Programming in Python
| | |-+  Python Programming (help needed)
« previous next »
Pages: [1] Go Down Print
Author Topic: Python Programming (help needed)  (Read 459 times)
KBR
Guest
« on: May 11, 2011, 01:30:46 PM »

[Q1] Write a program to calculate xy  , where y can be any integer. The program should have a main part to input x and y and a function to return the power.

[Q2]Write a program that:
I.   generates 6 different random numbers between 1 and 40,
II.   stores these numbers in a list and,
III.   displays the smallest and largest number from this list.

[Q3]Write a program that does the following:
I.   Constructs a window with the title “Triangles” and dimensions 500 × 500.
II.   Draw a red triangle with blue borders by clicking on any three points in the window.
III.   Draw an isosceles right angled triangle having its hypotenuse on a horizontal line. Assume that the length of the equal sides is 50 units

[Q4]Write a program that draws a rectangle from the two mouse clicks which corresponds to the opposite corners of a rectangle and displays the area and perimeter of the rectangle.

Logged
Pages: [1] Go Up Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.10 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!