Question: 1 . What is the difference between a compiled language and scripting language? 2 . Suppose a new instruction were inserted as follows: x =

1. What is the difference between a compiled language and scripting language?
2. Suppose a new instruction were inserted as follows: x=3, y=5
x = get next input
y = get next input
z = x + y
Add 2 to z
Put z to output
What would the last instruction output to the screen?
3. Explain the difference between statically-typed languages and dynamically-typed languages. Give examples for both.
4. Write down output from the program below:
print('Hello my friends.', end='')
print('We already passed...', end='')
print('MidtermExam!')
5. Write down output from the program below:
grade =105
print('Grade is', end='')
print(grade)
print('Congratulations!')
6. Write a statement that prints the value of the variable num_students.
7. Type the program's output:
cat_age =6
print('Felix is', cat_age, 'years.')
8. Please write down the program's output:
print('Enter salary:', end='') Input: 1200
salary = int(input())
new_salary = salary +100
print('New salary:', new_salary)
9. Please write down the missing line of program's code:
num1= int(input())
num3= int(input())
print(num1* num2* num3)
10. Type a statement that converts the string '23' to an integer and assigns my_age with the result.
11. A basic computer program's instructions get input, process, and put output. True/False

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!