Robotics & AI Revision Sheet T2 Answers
Robotics & AI Revision Sheet T2 Answers
Question 2:
(a) Joining elements together to make a string is called _________.
● Answer: Concatenation
● Answer: Boolean
● Answer: Infinite
*(e) print(“hello”2) will give the output _______________.
● Answer: hellohello
● Answer: The data footprint refers to the amount of data that is generated,
processed, and stored by a system or an organization. It represents the overall
impact of data in terms of storage space and resource utilization.
● python
● Copy code
for i in range(5):
print(i)
●
● While loop:
● python
● Copy code
count = 0
while count < 5:
print(count)
count += 1
● Answer: In Python, the 'else' statement is used in conjunction with 'if' statements
to specify a block of code that should be executed when the 'if' condition is false.
python
Copy code
s = "python rocks"
print(s[7:11]*3)
● Answer: rocksrocksrocks
● Answer:
Ergonomics: Designing the robot to mimic human form for ease of
interaction and integration into human environments.
Sensory Systems: Incorporating advanced sensor systems to enable the
robot to perceive and respond to its surroundings.
Question 4: Long Answers
Copy code
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
<!-- Content goes here -->
</body>
</html>
python
Copy code
(b) Write a Python program to take a starting and ending integer number from the user
and print the total of odd numbers between them.
python
Copy code
(c) Write a Python program to take the side of a square and print the area and perimeter
of the square.
python
Copy code
area = side ** 2
perimeter = 4 * side
python
Copy code
python
Copy code
python
Copy code
for i in range(5):
for j in range(i + 1):
print(chr(65 + j), end=" ")
print()
python
Copy code
fruits_colors = {
'Apple': 'Red',
'Banana': 'Yellow',
'Orange': 'Orange',
'Grapes': 'Purple',
'Watermelon': 'Green'
}
python
Copy code
x, y = 20, 60
y, x = x, y + 2
print(x + y)