Test 2: Edhesive Questions & Answers | Questions with 100% Correct Answers | Updated & Verified
Which line of code outputs the decimal portion of a float stored in the variable x? - print (x - int(x)) Three of the following values could be stored as strings. When would you NOT use a string command? - To store decimal values. Consider the following code: x = int(input("Enter a number: ")) print (x) What happens if the user types in A? - It prints 65. Which of the following is NOT a data type in Python? - decimal Which of the following numbers might this code generate: nt(1,9)? - 1 What is NOT a built-in function in python? - string() To generate integers between and including -10 to 10 you would use: - nt(-10, 10) Consider the following code: a = 3 b = 2 print (a ** b) What is output? - 9
Document information
- Uploaded on
- November 11, 2022
- Number of pages
- 4
- Written in
- 2022/2023
- Type
- Exam (elaborations)
- Contains
- Questions & answers