

제목 없는 프레젠테이션
Presentation
•
Computers
•
University
•
Practice Problem
•
Hard
Uijin Jang
FREE Resource
43 Slides • 28 Questions
1
2
3
Open Ended
How do you think string formatting and data type conversion are useful when writing a program?
4
Multiple Choice
Which of the following is an important reason to learn the basics of programming?
To understand how computers work and solve problems
To memorize all programming languages
To avoid using technology
To only play computer games
5
6
Multiple Choice
Which format specifier would you use to print a floating-point number using the % operator in Python?
%d
%s
%f
%c
7
8
Multiple Choice
When using the % operator for string formatting in Python, how do you include multiple values in the string?
By separating values with commas inside the string
By enclosing the values in a tuple after the % operator
By using curly braces for each value
By writing each value on a new line
9
10
Open Ended
Explain the difference between printing '100' and printing '%d' % 100 in Python. What does each output represent?
11
12
Fill in the Blanks
Type answer...
13
14
Multiple Choice
Which of the following statements about the format() method in Python is correct?
It only works with strings, not numbers.
It allows you to specify the position of arguments using indices.
It cannot be used to format multiple values at once.
It replaces all curly braces with the same value.
15
16
Multiple Select
Select all the correct ways to format numbers with spaces or commas using the format() method in Python.
'{:3d}'.format(5)
'{:,}'.format(1234567)
'{:f}'.format(3.14)
'{:d,}'.format(1000)
17
18
Multiple Choice
Which method allows you to control the number of decimal places shown when printing a floating-point number in Python?
format() method
split() method
replace() method
join() method
19
20
21
Multiple Choice
What is the main difference between using commas in the print() function and using f-strings for output formatting in Python?
Commas add spaces between values, while f-strings allow for direct variable insertion without spaces.
Commas remove spaces between values, while f-strings add extra spaces.
Commas only work with strings, while f-strings only work with numbers.
Commas and f-strings produce identical output.
22
23
Open Ended
Explain how you can specify the width and alignment of output fields when printing variables in Python. Provide an example.
24
25
Multiple Select
Which of the following are valid escape characters in Python's print() function?
\n
\t
\b
\'
26
27
Open Ended
Describe the three main types of operators in Python and give an example of each.
28
Fill in the Blanks
Type answer...
29
30
Fill in the Blanks
Type answer...
31
Multiple Choice
Which operator would you use in Python to calculate the remainder when dividing two numbers?
+
-
%
**
32
33
Open Ended
Write a program that calculates the ratio of male to female applicants given their respective counts. What Python operators would you use and why?
34
35
Open Ended
Explain the difference between the '/' and '//' operators in Python. Provide an example for each.
36
37
38
Multiple Select
Which of the following statements about the '%' operator in Python are correct?
It returns the quotient of division.
It returns the remainder of division.
It can be used to check if a number is even or odd.
It always returns a float.
39
40
Open Ended
Given a total amount of 5000 won and a product price of 2600 won, how many 500-won and 100-won coins will be returned as change? Show your calculation process.
41
42
Multiple Choice
Which operator in Python is used for exponentiation and what is its associativity?
** operator, right-to-left
* operator, left-to-right
^ operator, left-to-right
** operator, left-to-right
43
44
Multiple Choice
Arrange the following operators in order of increasing precedence: +, *, //, %.
+, *, //, %
+, //, %, *
+, %, //, *
+, *, %, //
45
46
Open Ended
Explain how you can convert a string representing a number into an integer or a float in Python. Give an example.
47
48
Open Ended
Write a program that calculates the total sales for a coffee shop given the number of items sold for each menu item. The menu prices are: Americano = 2,000, Cafe Latte = 3,000, Green Tea = 2,500.
49
50
Multiple Choice
BMI is calculated as weight (kg) divided by height (m) squared. If a person weighs 65 kg and is 175 cm tall, what is their BMI?
21.22
23.45
19.87
25.10
51
52
Fill in the Blanks
Type answer...
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
Open Ended
Reflecting on today's session about programming basics, what is one question you still have or a concept you would like to explore further?
71
Multiple Choice
Which topic from today's lesson did you find most interesting or would like to learn more about?
String formatting
print() function
Operators
Data type conversion
Show answer
Auto Play
Slide 1 / 71
SLIDE
Similar Resources on Wayground
65 questions
Membrane transport
Presentation
•
University
62 questions
Module 11 - 13: Data, Risk, Governance
Presentation
•
University
65 questions
Workshop Guru SD TU
Presentation
•
Professional Development
65 questions
Exposure and Vulnerability (Cycles 2 and 3)
Presentation
•
12th Grade
67 questions
GECC103-1D-REINFORCEMENT-UNIT2-LESSON4-LOGIC AND ITS FORMALITY
Presentation
•
University
66 questions
CE 123 Kejahatan Siber dan Informasi
Presentation
•
University
64 questions
mobile lesson
Presentation
•
University
63 questions
Week 7 - DCS1101
Presentation
•
University
Popular Resources on Wayground
19 questions
Naming Polygons
Quiz
•
3rd Grade
10 questions
Prime Factorization
Quiz
•
6th Grade
20 questions
Math Review
Quiz
•
3rd Grade
15 questions
Fast food
Quiz
•
7th Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
20 questions
Inferences
Quiz
•
4th Grade
19 questions
Classifying Quadrilaterals
Quiz
•
3rd Grade
Discover more resources for Computers
50 questions
ELA EOG Prep 7th Grade
Quiz
•
KG - University
20 questions
Guess The App
Quiz
•
KG - Professional Dev...
11 questions
dog breeds
Quiz
•
3rd Grade - Professio...
11 questions
NFL Football logos
Quiz
•
KG - Professional Dev...
19 questions
Minecraft
Quiz
•
6th Grade - Professio...
20 questions
Block Buster Movies
Quiz
•
10th Grade - Professi...
10 questions
Would you rather...
Quiz
•
KG - University
49 questions
AP Environmental Science Final Exam Review
Quiz
•
10th Grade - University