In: Computer Science
Q4. Please write a function Calculate_integer_division(). Your function should accept two parameters num1 and num2 and return the result of integer division of num1 by num2. So if num1 is 9 and num2 is 2, the function should return 4. Call your function and print out the result.
Q5. Please print out the following with the help of a range() function: 200, 400, 600, 800
Q6. Please print 'Go.' if the traffic light is green, 'Wait.' if it's yellow and 'Stop!' if it's red. If it's none of the above, print 'Unknown color.'
Q7. Please print 'This is correct' if a real number is between 10.0 and 20.0 (including both 10 and 20).
Q8. Please print 'This is not correct' if a real number falls outside of the range described in the previous question.
Q9. Let's say that you decide to stop by the local cafe and purchase a cup of coffee. Please write a program that asks a user (you) for the price of this beverage. This program should then compute NY sales tax - 8.875% and display the amount of purchase, tax and total. Please use the format function to display cents.
Q10.Please write a program to produce the following output,
please use as few print statements as possible:
A1
A2
A3
A4
B1
B2
B3
B4
C1
C2
C3
C4
Q11. Please print the following string:
Cat said 'meou'.
Q12. Assume that c is a string variable. Write an expression that checks if c is a space, a tab or a newline character.
4 ans:
5 ans:
6 ans:
7 ans:
8 ans:
9 ans:
10 ans:
11 ans:
12 ans:
#if you have any doubt or more information needed comment below.i will respond as possible as soon..thanks.