Please answer these 5 questions using Python Write a statement that converts pi
ID: 3563634 • Letter: P
Question
Please answer these 5 questions using Python
Write a statement that converts pi / 7 to an angle in degrees and assigns the result to a variable. Use the ord function to find the ASCII code for 1, A, B, a, and b. Use the chr function to find the character for the decimal codes 40, 59, 79, 85, and 90. How do you display the characters and "? What is wrong in the following code? How do you fix it? title = "chapter " + 1 Which of the following statements is the precise meaning for the statement n = 3? n is a variable that holds int value 3. n is a variable that references an object that holds int value 3.Explanation / Answer
import math
#!/usr/bin/python
print(math.cos(math.radians(math.pi/7)))
3.5 program
#!/usr/bin/python
print (ord("1"));
print (ord("A"));
print (ord("B"));
print (ord("a"));
print (ord("b"));
print (chr(40));
print (chr(59));
print (chr(79));
print (chr(85));
print (chr(90));
print out
49
65
66
97
98
(
;
O
U
Z
3.6 print ("\ and "");
3.10 title = "Chapter " + str(1)
3.14 (1) n is a variable that hold int value 3