Author: admin
																	
																												 Home > Articles posted by admin (Page 205)  
																										 
								                                                             
						 
					 
				 
								 
			 
		
            			
									
						
			
								
					
						
						
						Question:
As we mentioned in the class, please modify the code below to create simple calculator to:
 	add addition, subtraction, multiplication and  division button and calculate accordingly
 	check if the num1 and num2 is valid entry(has to be all digits)
 	show "please select operation" when user...
						
					 
				 
			 
		
		
					
			
								
					
						
						
							Posted at 03:25h
							in 
Uncategorized                                                            
                                    by                                    admin
                                
                            															
																							
																							
													 
						Question: 
Using function or object method to write a program to return the number of times that the string
"code" appears anywhere in the given string, except we'll accept any letter for the 'd', so "cope" and "cooe" count.
For example:
'aaacodebbb' will have 1 "code"
'codexxcode' will have 2 "code"
'cozexxcope'...
						
					 
				 
			 
		
		
					
			
								
					
						
						
						Question:
Use TKinter to create following window with one label and three buttons:
 	the "blue" button will print "blue" in the python shell screen
 	the "red" button will print "red" in the python shell screen
 	if left mouse button click the "color" button will make label...
						
					 
				 
			 
		
		
					
			
								
					
						
						
							Posted at 21:35h
							in 
Uncategorized                                                            
                                    by                                    admin
                                
                            															
																							
																							
													 
						Question:
Make a program to verify whether the credit card numbers from ABCD Bank are valid or not.
A valid credit card from ABCD Bank has the following characteristics:
 	It must start with a 4, 5 or 6.
 	It must contain exactly 16 digits.
 	It must only consist...
						
					 
				 
			 
		
		
					
			
								
					
						
						
							Posted at 23:21h
							in 
Uncategorized                                                            
                                    by                                    admin
                                
                            															
																							
																							
													 
						Question 1: 
Write a Python program (either use function or object method) to check the validity of password input by users.
Validation :
 	At least 1 letter between [a-z] and 1 letter between[A-Z].
 	At least 1 number between [0-9].
 	At least 1 character from [$#@].
 	Minimum length...
						
					 
				 
			 
		
		
					
			
								
					
						
						
							Posted at 20:43h
							in 
code                                                            
                                    by                                    admin
                                
                            															
																							
																							
													 
						
...
						
					 
				 
			 
		
		
					
			
								
					
						
						
						Question:
Use TKinter and grid control to create following form:
...
						
					 
				 
			 
		
		
					
			
								
					
						
						
							Posted at 03:22h
							in 
Uncategorized                                                            
                                    by                                    admin
                                
                            															
																							
																							
													 
						Question: 
Write a function luckySum(a, b, c) to calculate sum of given 3 int values, a b c. The function will have a return value of their sum. However, if one of the values is 13 then it does not count towards the sum and...
						
					 
				 
			 
		
		
					
			
								
					
						
						
							Posted at 02:46h
							in 
Uncategorized                                                            
                                    by                                    admin
                                
                            															
																							
																							
													 
						
Import practice:
Question 1.
Write a short program to generate a list of five random integer numbers from 1 to 20, and print them out.
Question 2.
Write a short program that prints out a random decimal number every 3 seconds for 30 seconds
Bonus Question (Difficulty: Hard):
Write a function to print your name...
						
					 
				 
			 
		
		
					
			
								
					
						
						
						Question 1:
Modify the program we made in the class. Make sure you can close window when the game over window shows. You can find code from following link:
Friday shooting Game2
If you do not have the sound file, please download the following sound for this game:
shoot.wav
explosion.wav
bluespace.mp3
 
Question...