first group of challenges

This commit is contained in:
abd.shallal
2019-07-17 09:56:46 +03:00
commit 375875c7a1
379 changed files with 107059 additions and 0 deletions

View File

@@ -0,0 +1,3 @@
print('enter your name')
name = input("name : ")
print('your name is {0}'.format(name))

View File

@@ -0,0 +1,5 @@
print('enter your name')
name = input("name : ")
print('enter your surname')
surname = input("surname : ")
print('your name is {0} and surname is {1}'.format(name, surname))

View File

@@ -0,0 +1 @@
print('What do you call a bear with no teeth? \nA gummy bear!')

View File

@@ -0,0 +1,3 @@
number_1 = int(input('Calculate two numbers \n please, enter 1st. number : '))
number_2 = int(input('please, enter 2st. number : '))
print('the result is {0}'.format(number_1+number_2))

View File

@@ -0,0 +1,4 @@
number_1 = int(input('enter 1st number to calculate : '))
number_2 = int(input('enter 2nd number to calculate : '))
number_3 = int(input('enter 3rd number to multiply result by : '))
print('the answer is {0}'.format((number_2+number_1)*number_3))

View File

View File

@@ -0,0 +1,3 @@
name = input("enter your name : ")
age = int(input("enter your age : "))
print('{0} next birthday you will be {1}'.format(name, age+1))

View File

@@ -0,0 +1,3 @@
bill_price = int(input('Please enter bill total price : '))
number_of_diners = int(input('Please enter diners number : '))
print('the price for each person is {0}'.format(round(bill_price/number_of_diners,2)))

View File

@@ -0,0 +1,5 @@
days = int(input('Enter the number of days : '))
hours = days*24
minutes = hours*60
seconds = minutes * 60
print('In {0} days there are {1} hours , {2} minutes and {3} seconds'.format(days, hours, minutes, seconds))

View File

@@ -0,0 +1,2 @@
weight = float(input('Enter weight to convert it to pounds : '))
print('{0} kg = {1} pounds'.format(weight, (weight*2.204)))

View File

@@ -0,0 +1,4 @@
large = int(input('enter number over than 100 : '))
small = int(input('enter number smaller than 10 : '))
answer = large//small
print('{0} goes into {1} for {2} times'.format(small, large, answer))