File tree Expand file tree Collapse file tree 1 file changed +15
-13
lines changed Expand file tree Collapse file tree 1 file changed +15
-13
lines changed Original file line number Diff line number Diff line change 11521152 ]
11531153 },
11541154 {
1155- "cell_type" : " code" ,
1156- "execution_count" : 1 ,
1155+ "cell_type" : " markdown" ,
11571156 "metadata" : {},
1158- "outputs" : [],
11591157 "source" : [
1160- " gene1 = 10*\" AGT\" "
1158+ " ### How to read multiple values in a single line\n " ,
1159+ " \n " ,
1160+ " - use split() method of string class to split the input string into multiple values"
11611161 ]
11621162 },
11631163 {
11661166 "metadata" : {},
11671167 "outputs" : [
11681168 {
1169- "data" : {
1170- "text/plain" : [
1171- " 'AGTAGTAGTAGTAGTAGTAGTAGTAGTAGT'"
1172- ]
1173- },
1174- "execution_count" : 2 ,
1175- "metadata" : {},
1176- "output_type" : " execute_result"
1169+ "name" : " stdout" ,
1170+ "output_type" : " stream" ,
1171+ "text" : [
1172+ " num1=10 and num2=20\n "
1173+ ]
11771174 }
11781175 ],
11791176 "source" : [
1180- " gene1"
1177+ " # Enter two numbers separated by space\n " ,
1178+ " values = input()\n " ,
1179+ " num1, num2 = values.split()\n " ,
1180+ " num1 = int(num1)\n " ,
1181+ " num2 = int(num2)\n " ,
1182+ " print(f'{num1=} and {num2=}')"
11811183 ]
11821184 },
11831185 {
You can’t perform that action at this time.
0 commit comments