Professional Documents
Culture Documents
Python For Oil and Gas: Website - Linkedin - Youtube
Python For Oil and Gas: Website - Linkedin - Youtube
Website - https://petroleumfromscratchin.wordpress.com/
LinkedIn - https://www.linkedin.com/company/petroleum-from-scratch
YouTube - https://www.youtube.com/channel/UC_lT10npISN5V32HDLAklsw
branch, sub = input('What is your engineering branch and which subject do you like the most? ')
/
1/28/2021 Python for O&G lecture 8- Input Function - Part 2 - Colaboratory
What is your engineering branch and which subject do you like the most? Petroleum Reservoir
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-2-75f57037cb32> in <module>()
----> 1 branch, sub = input('What is your engineering branch and which subject do you like the most? ')
branch, sub = input('What is your engineering branch and which subject do you like the most? ').split()
ValueError: too many values to unpack (expected 2)
What is your engineering branch and which subject do you like the most? Petroleum Reservoir
Petroleum
print(sub)
Reservoir
branch, sub = input('What is your engineering branch and which subject do you like the most? ').split()
What is your engineering branch and which subject do you like the most? PetroleumReservoir
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-6-6746823e96ee> in <module>()
----> 1 branch, sub = input('What is your engineering branch and which subject do you like the most? ').split()
branch, sub = input('What is your engineering branch and which subject do you like the most? ').split(',')
What is your engineering branch and which subject do you like the most? Civil, SOM
print(branch) /
1/28/2021 Python for O&G lecture 8- Input Function - Part 2 - Colaboratory
Civil
print(sub)
SOM
branch, sub = input('What is your engineering branch and which subject do you like the most? ').split(',')
What is your engineering branch and which subject do you like the most? Civil SOM
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-10-1c45e385b924> in <module>()
----> 1 branch, sub = input('What is your engineering branch and which subject do you like the most? ').split(',')
Assignment 4
/
1/28/2021 Python for O&G lecture 8- Input Function - Part 2 - Colaboratory