Quick actions

cmd+k|ctrl+k

Navigation

Languages

test

Snippet info

Language

Python

Visibility

public

Author

soumithpotturi

Created

2020-03-10T17:16:19Z

Updated

2020-03-11T23:18:20Z

#identifying types
a = str(100)
b = int(a)
c = type(b)
print(type(int(str(100))))

#string concjdnjsdnation
print("\t it\'s \"kind of\" sunny day \n \t have a good day")

score = 173

#formatted type coverted strings
score = 173
run_rate = 173/20
print('SRH innings rr was ' + str(run_rate) + ' per over')
#easier method
print(f'SRH innings rr was {run_rate} per over')

#another program to understand conversions 
value = 15
string = '200'
result = int(string) + value
print(f'value of 15 + string of 200 equals to {result}')

string = '012345678'
print(string[1:4:1])

#another random exercise by andrei
age = 50
birth_year = input('What is your birth year ?')
print(f'You are {age} years old and your relationship is complicated')
INFO