[SOLVED] IT5001 Lab 1- Evaluation, Variables and Turtle

30.00 $

Category:
Click Category Button to View Your Next Assignment | Homework

You will receive the following solution file(s) instantly after successful payment:

zip file icon Lab-1-sy0dif.zip (141.9 KB)
Assignment Instructions Updated Recently? Submit Below and we will provide new Solution!
Submit New Instructions
πŸ”’ Securely Powered by:
Secure Checkout
5/5 - (1 vote)

In this exercise, try to come up with the answer without using IDLE/Python first. Then type the expressions into IDLE to verify your answers. The objective is for you to understand why and how they work.
Part 1 Arithmetic Evaluation
Code Output

3 * 4 + 5

3 + 4 * 5

5 ** 3 % 4

97 / 4

97 // 4

Part 2 Logical Evaluation
Code Output

3 + 2 == 1 + 4

4 > 4

True or False

not False

not not True

not 0

not 9999

Part 3 String Evaluation
Code Output

‘abc’ + ‘def’

‘gala’ * 3

‘mu’ + ‘ha’ * 4

(‘ba ‘*2+’bidu’*2+’bi ‘ + ‘jam ‘*2)*3

‘banana'[3]

‘banana'[2:4]

Part 4 Operator Precedence
Code Output

1 + 2 * 3

1 + 2 * 3 **4

1 + 2 * 3 **4 – 5

not 0 + 1

Part 5 Turtle Graphics
You can draw pictures with the turtle package in Python. Try out the following commands and guess what they will do.

  • Lab-1-sy0dif.zip