Author: admin
																	
																												 Home > Articles posted by admin (Page 57)  
																										 
								                                                             
						 
					 
				 
								 
			 
		
            			
									
						
			
								
					
						
						
						Question: (Hint: Dijkstra)
The young explorer came to a tribe. There he fell in love with the chief's daughter, so he went to the chief to ask for marriage. The chief asked him to use 10,000 gold coins as a dowry before agreeing to marry his...
						
					 
				 
			 
		
		
					
			
								
					
						
						
							Posted at 05:22h
							in 
Uncategorized                                                            
                                    by                                    admin
                                
                            															
																							
																							
													 
						Question:
Continue modify the war-robot program we made in the class, so that:
 	if enemy’s hp is lower or equal to 0, use msgbox to display message ‘you win’, and the while program finish.
 	it will be the enemy’s turn to strike you back. Enemy can...
						
					 
				 
			 
		
		
					
			
								
					
						
						
						
Question:
Martha takes a jar of quarters to the casino with the intention of becoming rich. She plays three machines in turn. Unknown to her, the machines are entirely predictable. Each play costs one quarter. The first machine pays 30 quarters every 35th time it is played; the second machine...
						
					 
				 
			 
		
		
					
			
								
					
						
						
						Question:
Write a program to ask the user for five names. The program should store the names in a list, and print them all out in alphabetical order at the end. It should look something like this:
Sample input:
Enter 5 names:
Tony
Paul
Nick
Michel
Kevin
Sample output:
The names are Kevin, Michel, Nick,...
						
					 
				 
			 
		
		
					
			
								
					
						
						
						
Question: (We did this question before, but please use set we learned from class to solve the question this time.)
Use input() to take 10 input from user, each item is separated by space. Then try to complete the following task:
 	Create a list from the...
						
					 
				 
			 
		
		
					
			
								
					
						
						
							Posted at 05:04h
							in 
Uncategorized                                                            
                                    by                                    admin
                                
                            															
																							
																							
													 
						
Question 1:
Create a Student class and make the following methods to :
 	__init__() – Initialize it with name and roll number.
 	__str__() – Display all information of the student.
 	setAge() – It should assign age to student.
 	setMarks() – It should assign marks to the...
						
					 
				 
			 
		
		
					
			
								
					
						
						
						Question:
Being able to send encoded messages during World War II was very important to the Allies. The messages were always sent after being encoded with a known password. Having a fixed password was of course insecure, thus there was a need to change it frequently....
						
					 
				 
			 
		
		
					
			
								
					
						
						
							Posted at 04:58h
							in 
Uncategorized                                                            
                                    by                                    admin
                                
                            															
																							
																							
													 
						
Question 1:
Create a Student class and make the following methods to :
 	__init__() – Initialize it with name and roll number.
 	__str__() – Display all information of the student.
 	setAge() – It should assign age to student.
 	setMarks() – It should assign marks to the...
						
					 
				 
			 
		
		
					
			
								
					
						
						
						
Question 1:
Create a loop between 1 to 20.
 	Print “fizz” if the number is divisible by 3
 	Print “bizz” if the number is divisible by 5
 	Print “fizzbizz” if a number is divisible by both 3 and 5.
 	Otherwise, print the number itself.
Question 2:
Your hero...
						
					 
				 
			 
		
		
					
			
								
					
						
						
						Question: (floyd-warshall)
There are N players in Dota team.This year's The Weekend Battle Cup is coming, and Jack want to select some excellent player to attend the contest. There have been M matches since the last few days(No two players will meet each other at two...