Chapter 7,8,11
Chapter 7,8,11
1. ____________ construct is used in situations where a user can decide among multiple conditions.
1. python
Value = 40
If Value >= 25
print("Smaller Value)
2. python
A = 10, B = 20
if (15 == A)
print("A"; A, "B="; B)
3. python
input('Enter a number, A)
Num1 = input()
Num2 = int(input())
print(Num1 + Num2)
C. Programming Questions
1. Write a Python program to accept the length and breadth of a rectangle and calculate its area
and perimeter.
2. Write a Python program to accept three numbers from the user and display the largest number.
4. Identify which of the following are valid/invalid variable names. Provide reasons for invalid names.
- a. Num%
- b. First Name
- c. Value1
- d. Int
- e. Stock
5. How do you accept data from a user? Give the syntax with an example.
Chapter 11: Troubleshooting
4. You check the power supply points for ____________ related problems.
B. True or False?
3. The three areas to troubleshoot are: hardware, software, and operating system.
4. If your Windows restarts without warning, then there is a problem in the computer hardware.
5. Proper maintenance will increase the speed and life of your PC.
2. The system crashes when you are working with specific software.
1. The ____________ statement skips the rest of the loop and moves to the next iteration.
3. The ____________ part of the while loop executes only when all iterations are completed.
4. Conditions are checked for True or False, and statements execute only if the condition is
____________.
Original Code:
python
x=5
print(x + 10)
x += 2
Original Code:
python
print(x)
C. Output the following codes.
1. Code:
python
Num = 0
Num += 1
if Num == 5:
break
print(Num, end="")
2. Code:
python
if val == "l":
break
print(val)
print("Over")