Python Class - Spring 2015 - Class Assignments and related Notes
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
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:
|
![]() |
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 Click Below |
Easier Homework !!! April 27 |
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 ! |