Python Continued Lesson 2 – Modify
Modify the code so that it also responds with a unique message if the user types in the word ‘Terrible’. Below, explain how you modified the above code.
Python Continued Lesson 2 – Modify Read More »
Modify the code so that it also responds with a unique message if the user types in the word ‘Terrible’. Below, explain how you modified the above code.
Python Continued Lesson 2 – Modify Read More »
Using the python IDE below, investigate the following and explain your findings in the text area below. 1. What happens if the user is asked to type in the numbers 1, 2 or 3, instead of Good, OK and Bad? 2. What changes are needed to get the code to run?
Python Continued Lesson 2 – Investigate Read More »
Now type the code into the IDE below and run the program to see the code’s output.
Python Continued Lesson 2 – Run Read More »
Study the code below: answer = input(“How are you today? Good/OK/Bad”) if answer == “Good”: print(“Great to hear it!”) elif answer == “OK”: print(“Average day this, is it?”) elif answer == “Bad”: print(“Sorry you’re unhappy”) else: print(“You didn’t answer correctly”)
Python Continued Lesson 2 – Predict Read More »
Write a program that asks the user for the dimensions for a box in cm, and then works out its volume. The program should accept 3 positive integers separately.
Python Continued Lesson 1 – Make 4 Read More »
Write a program that asks the user for their age and then displays what their age will be in 52 years.
Python Continued Lesson 1 – Make 3 Read More »
Write a program that asks the user for their favourite colour and then comments on the colour entered (for example, “**colour entered**, is a nice colour!”).
Python Continued Lesson 1 – Make 2 Read More »
Create a program that asks the user to enter a message, then get the program to output the entered message to the screen.
Python Continued Lesson 1 – Make 1 Read More »
Modify the code above so that that it requests that the user enters two numbers, then multiplies them together and outputs the result. Below, explain how you modified the above code.
Python Continued Lesson 1 – Modify Read More »
Using the python IDE below, investigate the following and explain your findings in the text area below. 1. What happens if you enclose both of the input statements with the int() function? (e.g. number1 = int(input(“Enter a number”)) 2. What does the int() function do? Explain the result of the code alteration.
Python Continued Lesson 1 – Investigate Read More »