Author: admin
																	
																												 Home > Articles posted by admin (Page 29)  
																										 
								                                                             
						 
					 
				 
								 
			 
		
            			
									
						
			
								
					
						
						
						
You could do the following homework using IDLE 
Question 1
Make a variable and assign a number to it (any number you like). Then display your variable using print.
Question 2
Modify your variable, either by replacing the old value with a new value, or by adding something to the old value. Display...
						
					 
				 
			 
		
		
					
			
								
					
						
						
						
Question 1:
Numerous local and international recreational runners were eager to take part in this year’s Zagreb Marathon! It is an already traditional race 42125 meters long. A curious statistical info is that this year every single contestant managed to complete the race, except one.
Since marathons...
						
					 
				 
			 
		
		
					
			
								
					
						
						
							Posted at 23:38h
							in 
Uncategorized                                                            
                                    by                                    admin
                                
                            															
																							
																							
													 
						
Question:
Problem Description
You are trying to pass the time while at the optometrist. You notice there is a grid of four numbers:
1
2
3
4
You see lots of mirrors and lenses at the optometrist, and wonder how flipping the grid horizontally or vertically would change the grid. Specifically, a...
						
					 
				 
			 
		
		
					
			
								
					
						
						
						
Question 1:
Please using easygui to create the program we made in the class. The enter box will ask you password, if you get the right password, the msgbox will display the following image (You need download the following images and save into the same folder...
						
					 
				 
			 
		
		
					
			
								
					
						
						
						Question:
The factorial function (symbol: !) says to multiply all whole numbers from our chosen number down to 1.
Examples:
 	4! = 4 × 3 × 2 × 1 = 24
 	7! = 7 × 6 × 5 × 4 × 3 × 2 × 1 = 5040
 	1! = 1
Factorial is not defined for...
						
					 
				 
			 
		
		
					
			
								
					
						
						
							Posted at 12:16h
							in 
Uncategorized                                                            
                                    by                                    admin
                                
                            															
																							
																							
													 
						Question:
Before being an ubiquous communications gadget, a mobile was just a structure made of strings and wires suspending colourfull things. This kind of mobile is usually found hanging over cradles of small babies.
The figure illustrates a simple mobile. It is just a wire, suspended by...
						
					 
				 
			 
		
		
					
			
								
					
						
						
						Question 1:
Make a class definition for a  BankAccount. It should have attributes for :
– its name (a string),
– account number (a string or integer),
– and balance (a float).
It should have methods to:
– make deposits with displaying the balance,
– and make withdrawals with displaying the balance.
Hint:
Question 2:
Create...
						
					 
				 
			 
		
		
					
			
								
					
						
						
						Question:
The Body Mass Index (BMI) is one of the calculations used by doctors to assess an adult’s health. The doctor measures the patient’s height (in meters) and weight (in kilograms), then calculates the BMI using the formula:
BMI = weight / (height * height)
Write a program...
						
					 
				 
			 
		
		
					
			
								
					
						
						
						Question: (Please use DP to solve)
Many people think number 4 is a unlucky number. Let's find out lucky numbers between a range.
InputEach line contains a pair of number N, M (0<N≤M<10000000000) as following :N MInput is ended with the line0 0
OutputOutput should contain the count...
						
					 
				 
			 
		
		
					
			
								
					
						
						
						Question:
The Body Mass Index (BMI) is one of the calculations used by doctors to assess an adult’s health. The doctor measures the patient’s height (in meters) and weight (in kilograms), then calculates the BMI using the formula:
BMI = weight / (height * height)
Write a program...