Created
May 12, 2019 10:05
-
-
Save MrSimsek/2e48f8c72a783da0fe573540ec1fa304 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Print statement | |
print('Hello Deniz. I am 25 years old.') | |
# Print statement with Variables | |
name = "Jon" | |
age = '25' | |
def greet(name, age): | |
print('Hello ' + name + '. I am', age, 'years old.') | |
greet(name, age) | |
greet('Brian', 15) | |
print('\n') | |
# Survey | |
name = input('What is your name? ') | |
print('Hello ' + name + '!') | |
age = input('How old are you? ') | |
if int(age) > 20: | |
print('You are getting old.') | |
else: | |
print('You are young.') | |
print('\n') | |
# Character Creator | |
speed = 12 * 4 | |
strength = 5 | |
name = "John Wick" | |
print('Character Name: ' + name) | |
print('Speed: ', speed) | |
print('Strength: ', strength) | |
print('\n') | |
# Calculator | |
print('Let\'s make an addition') | |
number1 = input('Enter a number: ') | |
number2 = input('Enter another number: ') | |
result = int(number1) + float(number2) | |
print('Result is:', result) | |
print('\n') | |
# For Loop | |
fruits = ["apple", "banana", "cherry"] | |
for x in fruits: | |
print(x) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment