first group of challenges
This commit is contained in:
3
challenges1-11/challenage-001.py
Normal file
3
challenges1-11/challenage-001.py
Normal file
@@ -0,0 +1,3 @@
|
||||
print('enter your name')
|
||||
name = input("name : ")
|
||||
print('your name is {0}'.format(name))
|
5
challenges1-11/challenage-002.py
Normal file
5
challenges1-11/challenage-002.py
Normal 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))
|
1
challenges1-11/challenage-003.py
Normal file
1
challenges1-11/challenage-003.py
Normal file
@@ -0,0 +1 @@
|
||||
print('What do you call a bear with no teeth? \nA gummy bear!')
|
3
challenges1-11/challenage-004.py
Normal file
3
challenges1-11/challenage-004.py
Normal 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))
|
4
challenges1-11/challenage-005.py
Normal file
4
challenges1-11/challenage-005.py
Normal 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))
|
0
challenges1-11/challenage-006.py
Normal file
0
challenges1-11/challenage-006.py
Normal file
3
challenges1-11/challenage-007.py
Normal file
3
challenges1-11/challenage-007.py
Normal 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))
|
3
challenges1-11/challenage-008.py
Normal file
3
challenges1-11/challenage-008.py
Normal 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)))
|
5
challenges1-11/challenage-009.py
Normal file
5
challenges1-11/challenage-009.py
Normal 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))
|
2
challenges1-11/challenage-010.py
Normal file
2
challenges1-11/challenage-010.py
Normal 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)))
|
4
challenges1-11/challenage-011.py
Normal file
4
challenges1-11/challenage-011.py
Normal 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))
|
Reference in New Issue
Block a user