firstNum =4;
negnum = -2;
complex = 1+2j;
string = 'jj';
floataa = 1.0;
String = '01234567';
site = "www.google.com";
list = ['string',1,1.0,-3,3+5j];
print(firstNum);
print(negnum);
print(string);
print(floataa);
print(complex*complex);
print(String);
print(site);
print('String[0]:',String[0]);
print('String[1:]:',String[1:]);
print('String[-1]:',String[-1]);
print('list=',list);
print('list[0]=',list[0]);
print('list[1:]=',list[1:]);
print('list[-1]:',list[-1]);
print ('list[-3:-1] = ',list[-3:-1]);
print ('list[-1:1] = ',list[-1:1]);
print ('list[-1:0] = ',list[-1:0]);
tuple = ( 'maxsu', 786 , 2.23, 'yiibai', 70.2 )
tinytuple = (999.0, 'maxsu')
print ('tuple = ', tuple)
print ('tuple[0] = ', tuple[0])
print ('tuple[1:3] = ', tuple[1:3])
print ('tuple[-3:-1] = ', tuple[-3:-1])
print ('tuple[2:] = ', tuple[2:])
print ('tinytuple * 2 = ',tinytuple * 2)
print ('tuple + tinytuple = ', tuple + tinytuple)
print('=================first test==============');
s1,s2=72,85;
rate = (s2-s1)/s1;
print('%.1f' % rate);
L = [
['you', 'Google', 'Microsoft'],
['Java', 'are', 'Ruby', 'PHP'],
['Adam', 'Bart', 'beautiful!']
]
print(L[0][0]);
print(L[1][1]);
print(L[-1][-1]);
print('=================second test==============');
age = input('please inut your age: ');
if (((int(age))<18)&((int(age))>10)):
print('you are teenager');
elif (int(age))<10:
print('you are kid');
else:
print('you are adult');
dic = {}
dic['one'] = "one"
dic[2] = "two"
tinydic = {'name': 'Robin', 'code' : 1458, 'dept':'R&D'}
print ("dict['one'] = ", dic['one'])
print ('dict[2] = ', dic[2])
print ('tinydict = ', tinydic)
print ('tinydict.keys() = ', tinydic.keys())
print ('tinydict.values() = ', tinydic.values())