Below are 30 direct coding questions based strictly on the activities ahead of w3schools exam Write a program that stores 5 numbers in a list and prints the highest number.…...
1. List Append Understanding What will be the output? colors = [] colors.append("red") colors.append("blue") print(colors) 2. Extend vs Append Explain the difference between: list1.append(['a','b']) list1.extend(['a','b']) 3. Removing Elements What does…...
1. Valid vs Invalid Variable Name _myVar = 10 Is this a valid variable name? Why? 2. Variable Naming Restriction for = 25 Why can’t this assignment be used? 3.…...
1. Variable Naming 2name = "Alex" Why is this variable name invalid in Python? 2. Variable Naming Rule user-name = "John" What rule of variable naming is being violated here?…...
1. Variable Naming Rules — Question 1 Which of the following is a valid Python variable name?a) 2nameb) student-namec) _student1d) class 2. Variable Naming Rules — Question 2 Why is…...
1. Variable Naming Rules Which of the following is a valid Python variable name?a) 2name b) student_name c) first-name Why is my variable = 10 invalid in Python? What is the difference…...
10 Conceptual (No-Code needed) Questions 1. What is a variable and why do we use it in Python?2. List the four main data types you learned and give one example…...
1. Addition Practice Create two integer variables and find their sum. Print the result. 2. Subtraction Task Store two numbers in variables and print the difference between them. 3.…...