Week 4 - Inputting Text and Using Variables

Question 1

A key element in gaining success is what drives you. The famous Brazilian footballer Pelé said that ‘Success is no accident. It is hard work, perseverance, learning, studying, sacrifice and most of all, love of what you are doing or learning to do’.  Create a new text cell below this question as shown in the video. In a sentence write down if you disagree or agree with his view of what it takes to be successful and how you think that impacts how you study physics.

Question 2

An important part of developing any skill is practise. Lets reinforce what we learned last week. Plot cos(x) over the range 0 to 4π.

Question 3

a) Below I have typed code to assign Planck’s constant to ‘h’ and the frequency of a photon to ‘f’. Label the constants so that someone looking over the code can easily identify what you have set the constants as. Evaluate the cell by clicking ‘shift’ and ‘enter’ to assign the values.

h=6.63*10^-34
f=500*10^-12

b) Calculate energy using the Einstein relation energy=h*f (note: ‘E’ is a protected symbol for the mathematical constant e=2.718.. so can’t be used in other forumla to represent something else. Therefore use the word ‘energy’ in your formula.)

c) Do the same calculation as above but this time use “ “ to add units that are desplayed as part of the output as shown in the video.