diff --git a/Summer-Time-W-Jeff/.firstprog.py.swp b/Summer-Time-W-Jeff/.firstprog.py.swp new file mode 100644 index 0000000..a907339 Binary files /dev/null and b/Summer-Time-W-Jeff/.firstprog.py.swp differ diff --git a/Summer-Time-W-Jeff/firstprog.py b/Summer-Time-W-Jeff/firstprog.py new file mode 100644 index 0000000..2130a96 --- /dev/null +++ b/Summer-Time-W-Jeff/firstprog.py @@ -0,0 +1,36 @@ +#from gasp import * +from random import randint + +'''Challenge write the following program +in a file named firstprog.py''' + +print("Experiment 1; ") +print( 1+2) +"How come this did not print" +print("but this did") +print() +print() + +print("Experiment 2:") +for number in 2,4,6: + print(2 * number) + +for number in 2,4,6: + print(3* number, end="") + +'''When you place an expression on a line in python script without the print +function that expression will not get excute. +Putting comma " , " at the end stop the print function from creating a newline. + +So far so good in this first lecture on introduction to Python which is a programming +language I learn that print is a build in function that is use to display output +to the user''' + +'''begin_graphics() + +Line((100,100), (200, 200)) +Circle((320, 240), 40) +Box((400, 300), 100, 85)''' + + + diff --git a/Summer-Time-W-Jeff/randomNumber.py b/Summer-Time-W-Jeff/randomNumber.py new file mode 100644 index 0000000..74a2427 --- /dev/null +++ b/Summer-Time-W-Jeff/randomNumber.py @@ -0,0 +1,10 @@ +from random import randint +number1 = input (str("Enter two number to know it sum\n")) +number2 = input (str("\n")) +print( int(number1) + int(number2)) + +randint (2,16) +first_input = input(str("What is 8 time 2")) +second_input = input (str("")) +print(int (first_input) * int(second_input)) +