تم الحل ✓
categoryهندسة الحاسبات
schoolبكالوريوس
event_available2026-07-15
السؤال
Transcribed Image Text:
Practice Exercise 2
O Write a program that removes the nth index character from a
nonempty string
O Examples
==== RESTART: D:#2019 2 #45 (10A) #Week 3#2019xxxxxx_Week03.py
Enter a nonempty string: Python
Enter a index number: 1
New string: Pthon
Enter a index number: 3
New string: Pyton
Enter a index number: 5
New string: Pytho
>>>
27
Practice Exercise 3
O Write a program to request a string
O Count and display the number of vowels (a, e, i, o, u) in the
sentence.
■ Program will not match lowercase or uppercase of the character.
O Example
===== RESTART: D: W2019_2_#2019xxxxxx_Week03.py
Enter a string: HELLO! My favorite program language is Python :)
The number of vowel is: 14
>>>
28
Practice Exercise 4
O Write a program that creates a Caesar encryption
Note: In cryptography, a Caesar cipher, also known as the shift
cipher or Caesar shift, is one of the simplest and most widely
known encryption techniques. It is a type of substitution cipher in
which each letter in the plaintext is replaced by a letter some
fixed number of positions down the alphabet.
Ex) with a left shift of 3, D would be replaced by A, E would
become B, etc. We will use only lowercase characters with
length of 3. We will not use "x", "y", "z" as an input
O Examples
====== RESTART: D: W2019 2 BW2019xxxxxx_Week03.py
Enter three characters: asf
dvi
>>>
===== RESTART: D:#2019_2_#2019xxxxxx_Week03.py
Enter three characters: nrt
quw
>>>
29
check_circle الجواب — حل مفصل خطوة بخطوة
hourglass_top
🔒
الحل الكامل متاح للمشتركين
اشترك في أرشيف الأسئلة لعرض هذا الحل وآلاف الحلول المفصلة خطوة بخطوة من معلمين معتمدين.