Python Class - Spring 2015 - Class Assignments and related Notes

Assignments   Messages to Class
Programming tasks - homework and some notes    Message After First Class - April 1, 2015 - click here
     
 Assignment for April 15 - In place of an actual class !     Message after Second Class - April 8, 2015
     
Assignment - April 27    
     
Homework for April 29    
     
HOMEWORK HELP : How to write a program using user guesses !    
     
Binary    
     
Homework for May 13 +example    
     
     
     
     

Homework for April 29

Assignement 1: Write a program that sets a number and asks user to enter guesses till the right answer is entered. [ example of program to get a number from a user]

               Hint: tell the user whether their guess was high or low.

Assignment 2 : Modify the above program to use a random number for the number to be guessed

Assignment 3: [ if you finish the first 2] Write a program that will determine whether or not a numbe is a prime number

 

Binary:

My age in binary is : 1001011, how old am I?       What is your age in binary?

Converting from Base 2 (binary) to Base 10 (decimal)

1 0 1 1 1

Using above binary digits starting from the right end:

1 = 1 * (2**0) = 1 * 1= 1
1= 1 * (2**1) = 1 * 2= 2
1 = 1 * (2**2) = 2 * 2 = 4
0 = 0 * (2**3) = 0 * 8 = 0
1 = 1 * (2**4) = 1 * 16 = 16
binary arrows

Sum of decimal equivlants = 1 + 2 +4+0+16 = 23

 

 

 My age in binary is : 1001011, how old am I?       What is your age in binary?

Adventure game -May 25 version             Latest Additions / News Homework for April 29

Harry Baya    
harry@baya.net  
276-608-3060  

Click Below

 

Homework for May 13 +example

Click Here for Moodle Site

Easier Homework !!! April 27

Click Here for Turtle Graphics

Downloads - Website Creation

Assignement 1: Write a program that sets a number and asks user to enter guesses till the right answer is entered. [ example of program to get a number from a user]

               Hint: tell the user whether their guess was high or low.

Assignment 2 : Modify the above program to use a random number for the number to be guessed

Assignment 3: [ if you finish the first 2] Write a program that will determine whether or not a numbe is a prime number

Heather's Work on this Web site   Python Learning Check List HOMEWORK HELP : How to write a program using user guesses !